:root {
    --bg-color: #050a14;
    --card-bg: #0b1221;
    --primary-color: #00eaff;
    --secondary-color: #007ccb;
    --text-color: #e0e0e0;
    --text-muted: #a0a0a0;
    --white: #ffffff;
    --nav-height: 80px;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

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

/* Typography */
h1,
h2,
h3,
h4 {
    color: var(--white);
    font-weight: 700;
    line-height: 1.2;
}

h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
}

.highlight {
    color: var(--primary-color);
    text-shadow: 0 0 20px rgba(0, 234, 255, 0.3);
}

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

ul {
    list-style: none;
}

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

.section-padding {
    padding: 100px 0;
}

/* Navbar */
.navbar {
    height: var(--nav-height);
    background: rgba(5, 10, 20, 0.8);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
}

.logo-img {
    height: 40px;
    width: auto;
    border-radius: 5px;
    /* Optional rounded corners */
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

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

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

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

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--white);
    margin: 5px 0;
    transition: var(--transition);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
    text-align: center;
}

.btn-primary {
    background: linear-gradient(45deg, var(--secondary-color), var(--primary-color));
    color: var(--bg-color);
    box-shadow: 0 4px 15px rgba(0, 234, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 234, 255, 0.5);
}

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

.btn-secondary:hover {
    background: rgba(0, 234, 255, 0.1);
    color: var(--white);
}

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

.hero-video-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(5, 10, 20, 0.9) 0%, rgba(5, 10, 20, 0.6) 100%);
    z-index: -1;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    max-width: 600px;
}

/* Services */
.services-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
}

.service-card {
    flex: 1 1 300px;
    max-width: 350px;
    /* Prevent it from getting too wide/narrow */
    width: 100%;
    background: var(--card-bg);
    padding: 40px 30px;
    border-radius: 20px;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--secondary-color), var(--primary-color));
    transform: scaleX(0);
    transform-origin: left;
    transition: var(--transition);
}

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

.icon-box {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.service-card p {
    color: var(--text-muted);
}

/* About */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-features {
    margin-top: 30px;
}

.about-features li {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.1rem;
}

.about-features i {
    color: var(--primary-color);
}

.about-visual {
    position: relative;
    height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.glow-circle {
    position: absolute;
    width: 300px;
    height: 300px;
    background: var(--primary-color);
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.2;
    animation: pulse 4s infinite ease-in-out;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.2;
        transform: scale(1);
    }

    50% {
        opacity: 0.3;
        transform: scale(1.1);
    }
}

.tech-visual-placeholder {
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    /* In a real scenario, this would be an image */
}

/* Contact */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 50px;
    background: var(--card-bg);
    border-radius: 20px;
    padding: 50px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.info-item {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.info-item i {
    width: 50px;
    height: 50px;
    background: rgba(0, 234, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.info-item h4 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: var(--white);
}

.info-item a {
    color: var(--text-muted);
    transition: var(--transition);
}

.info-item a:hover {
    color: var(--primary-color);
}

.contact-form .form-group {
    margin-bottom: 20px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 15px;
    background: rgba(5, 10, 20, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--white);
    font-family: inherit;
    transition: var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(5, 10, 20, 0.8);
}

/* Footer */
.footer {
    padding: 30px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 50px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
}

.social-links {
    display: flex;
    gap: 20px;
}

.social-links a {
    color: var(--text-muted);
    font-size: 1.2rem;
    transition: var(--transition);
}

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

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.delay-1 {
    transition-delay: 0.2s;
}

.delay-2 {
    transition-delay: 0.4s;
}

/* Responsive */
@media (max-width: 992px) {
    .contact-wrapper {
        grid-template-columns: 1fr;
    }

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

    h1 {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {

    /* Critical Mobile Fixes */
    html,
    body {
        overflow-x: hidden;
        width: 100%;
        position: relative;
    }

    .container {
        padding: 0 15px;
        /* Reduce padding to give more content room */
    }

    .mobile-menu-btn {
        display: block;
        z-index: 1001;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 75%;
        /* Slightly wider menu */
        height: 100vh;
        background: var(--card-bg);
        flex-direction: column;
        padding-top: 100px;
        align-items: center;
        transition: 0.4s ease;
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.5);
    }

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

    h1 {
        font-size: 2.2rem;
        /* Smaller H1 */
        word-wrap: break-word;
        /* Prevent long words breaking layout */
        line-height: 1.3;
        /* Better line height for wrapping */
    }

    /* Hero Specific Mobile Tweaks */
    .hero-content {
        text-align: center;
        /* Center align text */
        display: flex;
        flex-direction: column;
        align-items: center;
        padding-top: 20px;
    }

    .hero p {
        font-size: 1rem;
        margin-bottom: 30px;
    }

    .hero-btns {
        display: flex;
        flex-direction: column;
        /* Stack buttons */
        gap: 15px;
        width: 100%;
        max-width: 300px;
        /* Limit width */
    }

    .btn {
        width: 100%;
        /* Full width buttons */
        margin: 0;
        /* Remove margin-left from secondary btn */
    }

    .btn-secondary {
        margin-left: 0;
        /* Reset desktop margin */
    }

    /* Adjust Service Card to prevent forcing width */
    .service-card {
        flex: 1 1 100%;
        /* Full width on mobile */
        max-width: 100%;
        padding: 30px 20px;
        /* Less padding */
    }

    .logo {
        font-size: 1.3rem;
        /* Slightly smaller logo text */
    }

    .hero-bg-animation::before {
        display: none;
        /* Performance on mobile */
    }
}

/* Language Switcher */
.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.lang-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--white);
    padding: 5px 15px;
    /* Increased padding */
    border-radius: 20px;
    /* Rounded pill shape */
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lang-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(0, 234, 255, 0.1);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--primary-color);
    color: var(--bg-color);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 5px 15px rgba(0, 234, 255, 0.4);
    transition: var(--transition);
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    animation: btnPulse 2s infinite;
}

@keyframes btnPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 234, 255, 0.7);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(0, 234, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(0, 234, 255, 0);
    }
}

.back-to-top:hover {
    transform: translateY(-5px);
    /* Pause animation on hover if desired, or keep it */
}

/* Gallery / Masonry Grid */
.gallery {
    background: var(--bg-color);
}

.masonry-grid {
    columns: 1;
    /* Default mobile */
    column-gap: 20px;
    margin-top: 40px;
}

@media (min-width: 600px) {
    .masonry-grid {
        columns: 2;
    }
}

@media (min-width: 992px) {
    .masonry-grid {
        columns: 3;
    }
}

.gallery-item {
    break-inside: avoid;
    margin-bottom: 20px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: var(--transition);
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 234, 255, 0.2);
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* Lightbox Modal */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    /* Above nav */
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90vh;
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(0, 234, 255, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.lightbox.active .lightbox-content {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: var(--white);
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}

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

/* Lightbox Navigation */
.lightbox-prev,
.lightbox-next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -50px;
    color: white;
    font-weight: bold;
    font-size: 40px;
    transition: 0.3s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    -webkit-user-select: none;
    z-index: 1002;
}

.lightbox-prev {
    left: 20px;
    border-radius: 3px 0 0 3px;
}

.lightbox-next {
    right: 20px;
    border-radius: 3px 0 0 3px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background-color: rgba(0, 0, 0, 0.8);
    color: var(--primary-color);
}

/* Nav Links specific adjustment for lang btn inside */
.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
    /* Center items vertically */
}

/* Projects Carousel (Card Deck Redesign) */
.projects {
    background: radial-gradient(circle at 50% 50%, #0d1b33 0%, var(--bg-color) 70%);
}

.carousel-container {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    /* Height needed for absolute/relative positioning */
    min-height: 500px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    perspective: 1000px;
    /* For 3D depth */
}

.carousel-track-container {
    position: relative;
    height: 400px;
    /* Fixed height for the deck area */
    width: 100%;
    margin-bottom: 20px;
}

.carousel-track {
    position: relative;
    width: 100%;
    height: 100%;
    list-style: none;
}

.carousel-slide {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    width: 80%;
    /* Base width */
    max-width: 400px;
    height: auto;
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
    z-index: 1;
    pointer-events: none;
    /* Prevent clicking hidden/back items */
}

/* Active Card (Center) */
.carousel-slide.active {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    z-index: 10;
    pointer-events: auto;
    box-shadow: 0 15px 50px rgba(0, 234, 255, 0.15);
}

/* Next Card (Right) */
.carousel-slide.next {
    transform: translate(10%, -50%) scale(0.85);
    /* 10% from center = slightly right */
    opacity: 0.4;
    z-index: 5;
    filter: blur(2px);
}

/* Prev Card (Left) */
.carousel-slide.prev {
    transform: translate(-110%, -50%) scale(0.85);
    /* -110% from center = slightly left */
    opacity: 0.4;
    z-index: 5;
    filter: blur(2px);
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .carousel-container {
        min-height: 450px;
    }

    .carousel-track-container {
        height: 380px;
    }

    .carousel-slide {
        width: 85%;
    }

    /* On mobile, maybe hide the side cards more or stack them? */
    /* Let's keep the effect but tighten it */
    .carousel-slide.next {
        transform: translate(10%, -50%) scale(0.8);
        opacity: 0.2;
    }

    .carousel-slide.prev {
        transform: translate(-120%, -50%) scale(0.8);
        opacity: 0.2;
    }
}

/* Desktop Adjustments used to spread them out */
@media (min-width: 900px) {
    .carousel-slide.next {
        transform: translate(30%, -50%) scale(0.85);
    }

    .carousel-slide.prev {
        transform: translate(-130%, -50%) scale(0.85);
    }
}


.project-card {
    background: var(--card-bg);
    border-radius: 20px;
    overflow: hidden;
    height: 100%;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.project-img-placeholder {
    height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.5);
    background-size: cover;
    background-position: center;
}

.project-content {
    padding: 25px;
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.2));
}

.project-content h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.project-content p {
    font-size: 1rem;
    color: var(--text-muted);
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--white);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 20;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.carousel-btn:hover {
    background: var(--primary-color);
    color: var(--bg-color);
    box-shadow: 0 0 15px rgba(0, 234, 255, 0.4);
}

.prev-btn {
    left: 10px;
}

.next-btn {
    right: 10px;
}

.carousel-nav {
    display: flex;
    justify-content: center;
    padding-top: 10px;
    gap: 15px;
    z-index: 20;
    position: relative;
}

.carousel-indicator {
    border: none;
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
}

.carousel-indicator.current-slide {
    background: var(--primary-color);
    transform: scale(1.3);
    box-shadow: 0 0 10px rgba(0, 234, 255, 0.3);
}