:root {
    --bg-color: #030014;
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-border: rgba(255, 255, 255, 0.1);
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --accent-1: #00f2fe;
    --accent-2: #4facfe;
    --accent-3: #ff0080;
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --font-heading: 'Rubik', sans-serif;
    --font-body: 'Heebo', sans-serif;
}

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

body {
    background-color: var(--bg-color);
    font-family: var(--font-body);
    color: var(--text-primary);
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

/* Background Animation */
.background-globes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
}

.globe {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: float 20s infinite ease-in-out;
}

.globe-1 {
    width: 400px;
    height: 400px;
    background: var(--accent-3);
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.globe-2 {
    width: 500px;
    height: 500px;
    background: var(--accent-2);
    bottom: -150px;
    left: -150px;
    animation-delay: -5s;
}

.globe-3 {
    width: 300px;
    height: 300px;
    background: var(--accent-1);
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -10s;
    opacity: 0.4;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0);
    }

    25% {
        transform: translate(50px, 50px);
    }

    50% {
        transform: translate(0, 100px);
    }

    75% {
        transform: translate(-50px, 50px);
    }
}

/* Glassmorphism Utility */
.glass {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--card-border);
    box-shadow: var(--glass-shadow);
}

/* Navigation */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(3, 0, 20, 0.8);
    backdrop-filter: blur(20px);
    padding: 1rem 5%;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(to right, var(--accent-1), var(--accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    margin-left: 2rem;
    font-size: 1.1rem;
    transition: color 0.3s ease;
    position: relative;
}

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

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

/* Hero Section */
.hero-section {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 20px;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    font-weight: 900;
}

.gradient-text {
    background: linear-gradient(to right, var(--accent-1), var(--accent-3));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 30px;
    background: linear-gradient(45deg, var(--accent-2), var(--accent-3));
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.4);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 0, 128, 0.4);
}

/* Portfolio Section */
.portfolio-section {
    padding: 100px 5%;
    max-width: 1400px;
    margin: 0 auto;
}

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

.section-header h2 {
    font-family: var(--font-heading);
    font-size: 3rem;
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1.2rem;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 40px;
    justify-content: center;
}

.project-card {
    border-radius: 20px;
    padding: 0;
    transition: transform 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow: hidden;
    height: 100%;
    background: rgba(255, 255, 255, 0.03);
    /* Slightly more transparent */
    border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.card-image {
    width: 100%;
    height: 220px;
    /* Included a bit more height */
    background: rgba(0, 0, 0, 0.3);
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    /* Centered top alignment */
    transition: transform 0.5s ease;
}

.project-card:hover .card-image img {
    transform: scale(1.05);
}

.card-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    text-align: right;
    /* Explicit RTL alignment */
}

/* Remove card-icon style as it is unused */

.project-card h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.project-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 25px;
    font-size: 1rem;
    flex-grow: 1;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--accent-1);
    font-weight: 500;
    transition: gap 0.3s ease;
}

.project-link:hover {
    gap: 12px;
    color: var(--accent-2);
}

/* Sticky WhatsApp Button */
.whatsapp-sticky {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #25d366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    transition: all 0.3s ease;
    text-decoration: none;
    animation: bounceIn 1s ease forwards;
    animation-delay: 2s;
    /* Wait for other animations */
    opacity: 0;
}

.whatsapp-sticky:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }

    50% {
        opacity: 1;
        transform: scale(1.05);
    }

    70% {
        transform: scale(0.9);
    }

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

/* Footer Update */
.footer {
    padding: 60px 5%;
    margin-top: 100px;
    border-radius: 30px 30px 0 0;
    border-bottom: none;
    /* No border at bottom edge */
}

@media (max-width: 768px) {
    .whatsapp-sticky {
        width: 50px;
        height: 50px;
        font-size: 25px;
        bottom: 20px;
        right: 20px;
    }
}

.footer h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    font-family: var(--font-heading);
}

.social-links {
    margin: 30px 0;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.social-links a {
    color: var(--text-secondary);
    font-size: 1.5rem;
    transition: color 0.3s ease, transform 0.3s ease;
}

.social-links a:hover {
    color: var(--text-primary);
    transform: scale(1.1);
}

.copyright {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Scroll Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.8rem;
    }

    .navbar {
        padding: 1rem 5%;
    }

    .nav-links {
        display: none;
        /* Mobile menu implementation usually needed here */
    }
}

/* Services Section */
.services-section {
    padding: 80px 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.section-description {
    font-size: 1.3rem;
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto 3rem auto;
    line-height: 1.6;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.service-card {
    border-radius: 20px;
    padding: 40px 30px;
    transition: transform 0.4s ease, border-color 0.4s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    height: 100%;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: rgba(255, 255, 255, 0.3);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 25px;
    color: var(--accent-2);
    background: rgba(255, 255, 255, 0.05);
    width: 90px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.service-card h3 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    margin-bottom: 15px;
}

.service-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 1.1rem;
}

.services-footer {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
    font-size: 1.4rem;
    color: var(--text-primary);
    font-weight: 500;
    line-height: 1.5;
    background: linear-gradient(to right, rgba(255, 255, 255, 0.05), transparent 80%);
    padding: 20px;
    border-radius: 15px;
    border: 1px solid var(--card-border);
}

/* Adjustments for new Hero content */
.hero-subtitle {
    max-width: 900px !important;
    /* Increase width for longer text */
}

@media (max-width: 768px) {
    .section-description {
        font-size: 1.1rem;
    }

    .service-icon {
        width: 70px;
        height: 70px;
        font-size: 2rem;
    }
}

/* Animations & Polish */

/* Hero Content Animation */
.hero-content {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease forwards;
    animation-delay: 0.2s;
}

.hero-subtitle {
    opacity: 0;
    animation: fadeInUp 1s ease forwards;
    animation-delay: 0.5s;
}

.cta-button {
    opacity: 0;
    animation: fadeInUp 1s ease forwards;
    animation-delay: 0.8s;
}

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

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

/* Service Card Hover Pulse */
.service-card:hover .service-icon {
    animation: pulse 1s infinite;
    color: var(--accent-1);
    background: rgba(255, 255, 255, 0.1);
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

/* Scroll Reveal Refinement - Overrides previous simpler definition */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered transition delays for grid items */
.service-card:nth-child(2) {
    transition-delay: 0.2s;
}

.service-card:nth-child(3) {
    transition-delay: 0.4s;
}

.project-card:nth-child(odd) {
    transition-delay: 0.1s;
}

.project-card:nth-child(even) {
    transition-delay: 0.3s;
}