/* --- ROOT VARIABLES & GLOBAL STYLES --- */
:root {
    --bg-color: #0A0A1A; /* Deep Navy Blue */
    --glass-color: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-color: #E0E0E0;
    --text-secondary: #AAAAAA;
    --aura-gradient: linear-gradient(90deg, #007CF0, #00DFD8, #FF007A);
    --accent-color: #00DFD8; /* Cyan for highlights */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 6rem 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: #FFF;
}

img {
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none;
    color: var(--text-color);
}

ul {
    list-style: none;
}

/* --- UTILITY CLASSES (Glass & Gradients) --- */
.glass {
    background: var(--glass-color);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
}

.gradient-text {
    background: var(--aura-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.btn-gradient {
    background: var(--aura-gradient);
    background-size: 200% auto;
    color: #FFF;
    border: none;
}

.btn-gradient:hover {
    background-position: right center;
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(0, 223, 216, 0.3);
}

.btn-outline {
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
    background: transparent;
}

.btn-outline:hover {
    background: var(--accent-color);
    color: var(--bg-color);
    box-shadow: 0 0 15px var(--accent-color);
}


/* --- 1. HEADER & NAVIGATION --- */
#header {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.2rem 0;
}

#header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: #FFF;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-weight: 400;
    position: relative;
    padding-bottom: 5px;
}

/* Animated underline for nav links */
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent-color);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease-out;
}

.nav-links a:hover::after {
    transform: scaleX(1);
}

.hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #FFF;
    transition: all 0.3s ease;
}

.mobile-nav {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 999;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.77, 0, 0.175, 1);
    border-radius: 0;
}

.mobile-nav.active {
    transform: translateX(0);
}

.mobile-nav a {
    font-size: 1.5rem;
    font-weight: 600;
}

/* Hamburger animation */
.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.active span:nth-child(2) {
    opacity: 0;
}
.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}


/* --- 2. HERO SECTION --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    padding-top: 80px; /* Offset for sticky header */
}

#tsparticles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 600px;
}


/* --- 3. SERVICES SECTION --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.service-card {
    padding: 2.5rem 2rem;
    text-align: center;
    transition: all 0.3s ease;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #FFF;
}

.service-card p {
    color: var(--text-secondary);
}

/* Service card hover effect */
.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 223, 216, 0.1);
}


/* --- 4. PORTFOLIO SECTION --- */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.portfolio-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.portfolio-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    padding: 3rem 1.5rem 1.5rem;
    transform: translateY(100%);
    transition: transform 0.4s ease-out;
}

.portfolio-overlay h3 {
    font-size: 1.3rem;
    color: #FFF;
    margin-bottom: 0.5rem;
}

.portfolio-overlay p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Portfolio hover effect */
.portfolio-item:hover img {
    transform: scale(1.1);
}

.portfolio-item:hover .portfolio-overlay {
    transform: translateY(0);
}


/* --- 5. & 6. ABOUT & CONTACT --- */
#about p, #contact p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 2rem auto;
    text-align: center;
}

#contact {
    text-align: center;
}

/* --- FOOTER --- */
footer {
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
    border-top: 1px solid var(--glass-border);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* --- SCROLL ANIMATIONS --- */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered animation for grid items */
.services-grid .animate-on-scroll:nth-child(1),
.portfolio-grid .animate-on-scroll:nth-child(1) { transition-delay: 0.1s; }
.services-grid .animate-on-scroll:nth-child(2),
.portfolio-grid .animate-on-scroll:nth-child(2) { transition-delay: 0.2s; }
.services-grid .animate-on-scroll:nth-child(3),
.portfolio-grid .animate-on-scroll:nth-child(3) { transition-delay: 0.3s; }
.services-grid .animate-on-scroll:nth-child(4) { transition-delay: 0.1s; }
.services-grid .animate-on-scroll:nth-child(5) { transition-delay: 0.2s; }
.services-grid .animate-on-scroll:nth-child(6) { transition-delay: 0.3s; }


/* --- MOBILE RESPONSIVENESS --- */
@media (max-width: 900px) {
    .services-grid,
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero-content h1 {
        font-size: 2.8rem;
    }
}

@media (max-width: 768px) {
    .nav-links,
    .btn-gradient {
        display: none;
    }

    .hamburger {
        display: flex;
        z-index: 1001; /* Above mobile nav */
    }

    .mobile-nav {
        display: flex;
    }

    .hero-content h1 {
        font-size: 2.2rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .services-grid,
    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 2rem;
    }
}
