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

:root {
    --primary-color: #0066ff;
    --primary-dark: #0052cc;
    --primary-light: #4d94ff;
    --secondary-color: #1a1a2e;
    --accent-color: #00d4ff;
    --text-color: #333333;
    --text-light: #666666;
    --bg-color: #ffffff;
    --bg-light: #f8f9fa;
    --bg-dark: #0a0e27;
    --bg-gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --bg-gradient-2: linear-gradient(135deg, #0066ff 0%, #00d4ff 100%);
    --border-color: #e0e0e0;
    --success-color: #10b981;
    --error-color: #ef4444;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --shadow-glow: 0 0 20px rgba(0, 102, 255, 0.3);
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-dark);
    font-size: 16px;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

/* Animated Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(0, 102, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 212, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(102, 126, 234, 0.08) 0%, transparent 50%),
        linear-gradient(135deg, #0a0e27 0%, #1a1a2e 100%);
    z-index: -2;
    animation: backgroundShift 20s ease-in-out infinite;
}

@keyframes backgroundShift {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.9; }
}

/* Grid Pattern Overlay */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 102, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 102, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -1;
    animation: gridMove 20s linear infinite;
    pointer-events: none;
}

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(10, 14, 39, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    transition: var(--transition);
    border-bottom: 1px solid rgba(0, 102, 255, 0.3);
}

.navbar.scrolled {
    background: rgba(10, 14, 39, 0.98);
    box-shadow: 0 4px 40px rgba(0, 0, 0, 0.6);
    border-bottom: 1px solid rgba(0, 212, 255, 0.4);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    text-decoration: none;
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    position: relative;
}

.logo-text {
    background: var(--bg-gradient-2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.logo-text::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--bg-gradient-2);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.logo:hover .logo-text::after {
    transform: scaleX(1);
}

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

.nav-menu a {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    padding: 0.5rem 0;
}

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

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

.nav-menu a:hover::before {
    width: 100%;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: white;
    transition: var(--transition);
    border-radius: 2px;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 80px;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    z-index: -1;
}

.hero-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.2) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
    z-index: 0;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(10, 14, 39, 0.6) 0%, rgba(10, 14, 39, 0.85) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 1;
    color: white;
    max-width: 800px;
    padding: 2rem;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s ease;
    background: linear-gradient(135deg, #ffffff 0%, #00d4ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(0, 212, 255, 0.5);
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    animation: fadeInUp 0.8s ease 0.2s both;
    color: rgba(255, 255, 255, 0.9);
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.4s both;
}

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

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
    border: 2px solid transparent;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--bg-gradient-2);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 102, 255, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 102, 255, 0.6);
}

.btn-secondary {
    background: transparent;
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

/* Sections */
.section {
    padding: 5rem 0;
    position: relative;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: white;
    position: relative;
    display: inline-block;
    width: 100%;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--bg-gradient-2);
    border-radius: 2px;
}

.about-section {
    background: transparent;
    color: white;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    padding: 3rem;
    border-radius: 20px;
    border: 1px solid rgba(0, 102, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.about-text p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.9);
}

.lead {
    font-size: 1.3rem;
    font-weight: 600;
    color: white;
    background: var(--bg-gradient-2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Services Section */
.services-section {
    background: transparent;
}

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

.service-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: var(--transition);
    text-align: center;
    border: 1px solid rgba(0, 102, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.1), transparent);
    transition: left 0.5s;
}

.service-card:hover::before {
    left: 100%;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 102, 255, 0.4);
    border-color: rgba(0, 212, 255, 0.5);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 10px rgba(0, 212, 255, 0.5));
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: white;
}

.service-card p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.7;
}

/* Projects Section */
.projects-section {
    background: transparent;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: var(--transition);
    border: 1px solid rgba(0, 102, 255, 0.2);
    position: relative;
}

.project-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-gradient-2);
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 0;
}

.project-card:hover::after {
    opacity: 0.1;
}

.project-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 102, 255, 0.5);
    border-color: rgba(0, 212, 255, 0.5);
}

.project-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: rgba(0, 102, 255, 0.1);
    position: relative;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.project-content {
    padding: 1.5rem;
    position: relative;
    z-index: 1;
}

.project-content h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: white;
}

.project-category {
    display: inline-block;
    background: rgba(0, 102, 255, 0.2);
    color: var(--accent-color);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(0, 212, 255, 0.3);
}

.project-content p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.project-link {
    display: inline-block;
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    position: relative;
}

.project-link::after {
    content: '→';
    margin-left: 5px;
    transition: transform 0.3s;
    display: inline-block;
}

.project-link:hover {
    color: white;
    transform: translateX(5px);
}

.project-link:hover::after {
    transform: translateX(5px);
}

/* Contact Section */
.contact-section {
    background: transparent;
}

.contact-content {
    max-width: 600px;
    margin: 0 auto;
}

.contact-info {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 102, 255, 0.2);
}

.contact-item {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.contact-item strong {
    display: block;
    color: white;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.contact-item p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
}

.contact-item small {
    display: block;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    line-height: 1.5;
    margin-top: 0.5rem;
    font-style: italic;
}

.contact-item a {
    color: var(--accent-color);
    text-decoration: none;
    transition: var(--transition);
}

.contact-item a:hover {
    color: white;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

/* Footer */
.footer {
    background: rgba(10, 14, 39, 0.95);
    backdrop-filter: blur(20px);
    color: white;
    padding: 3rem 0 1.5rem;
    border-top: 1px solid rgba(0, 102, 255, 0.2);
}

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

.footer-section h4 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
    background: var(--bg-gradient-2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.8;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: var(--transition);
}

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

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
}

/* Utility Classes */
.text-center {
    text-align: center;
}

/* Responsive Design */

/* Tablet and below */
@media (max-width: 992px) {
    .container {
        padding: 0 1.5rem;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero-title {
        font-size: 3.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.3rem;
    }
}

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

    /* Navigation */
    .mobile-menu-toggle {
        display: flex;
        z-index: 1001;
    }

    .nav-wrapper {
        padding: 0.75rem 0;
    }

    .logo {
        font-size: 1.25rem;
    }

    .nav-menu {
        position: fixed;
        top: 60px;
        left: -100%;
        flex-direction: column;
        background: rgba(10, 14, 39, 0.98);
        backdrop-filter: blur(20px);
        width: 100%;
        padding: 2rem 1rem;
        box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
        transition: left 0.3s ease;
        border-top: 1px solid rgba(0, 102, 255, 0.3);
        gap: 0;
        max-height: calc(100vh - 60px);
        overflow-y: auto;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-menu a {
        display: block;
        padding: 1rem 0;
        width: 100%;
    }

    /* Hero Section */
    .hero {
        min-height: 100vh;
        padding-top: 60px;
    }

    .hero-content {
        padding: 1.5rem 1rem;
    }

    .hero-title {
        font-size: 2.5rem;
        margin-bottom: 0.75rem;
        line-height: 1.2;
    }

    .hero-subtitle {
        font-size: 1.1rem;
        margin-bottom: 1.5rem;
        padding: 0 0.5rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        padding: 0 0.5rem;
    }

    .hero-buttons .btn {
        width: 100%;
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }

    /* Sections */
    .section {
        padding: 3rem 0;
    }

    .section-title {
        font-size: 2rem;
        margin-bottom: 2rem;
        padding: 0 0.5rem;
    }

    /* About Section */
    .about-content {
        padding: 1.5rem 1rem;
    }

    .about-text p {
        font-size: 1rem;
        margin-bottom: 1rem;
    }

    .lead {
        font-size: 1.15rem;
    }

    /* Services Grid */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .service-card {
        padding: 1.5rem;
    }

    .service-icon {
        font-size: 2.5rem;
    }

    .service-card h3 {
        font-size: 1.25rem;
    }

    .service-card p {
        font-size: 0.95rem;
    }

    /* Projects Grid */
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .project-card {
        margin-bottom: 0;
    }

    .project-image {
        height: 180px;
    }

    .project-content {
        padding: 1.25rem;
    }

    .project-content h3 {
        font-size: 1.2rem;
    }

    .project-category {
        font-size: 0.8rem;
        padding: 0.25rem 0.5rem;
    }

    /* Contact Section */
    .contact-info {
        padding: 1.5rem 1rem;
    }

    .contact-item {
        margin-bottom: 1.5rem;
        padding-bottom: 1.5rem;
    }

    .contact-item strong {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }

    .contact-item p {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    .contact-item small {
        font-size: 0.8rem;
        margin-top: 0.5rem;
    }

    /* Footer */
    .footer {
        padding: 2rem 0 1rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .footer-section h4 {
        font-size: 1.1rem;
    }

    .footer-section p {
        font-size: 0.9rem;
    }

    .footer-bottom {
        padding-top: 1.5rem;
        font-size: 0.85rem;
    }

    /* Buttons */
    .btn {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
        text-align: center;
        min-height: 44px; /* Touch-friendly */
    }

    /* Utilities */
    .text-center {
        text-align: center;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .container {
        padding: 0 0.75rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 1.25rem;
    }

    .section-title {
        font-size: 1.75rem;
        margin-bottom: 1.5rem;
    }

    .section {
        padding: 2.5rem 0;
    }

    .about-content,
    .contact-info {
        padding: 1.25rem 0.75rem;
    }

    .service-card,
    .project-content {
        padding: 1.25rem;
    }

    .service-icon {
        font-size: 2rem;
    }

    .logo {
        font-size: 1.1rem;
    }

    .nav-wrapper {
        padding: 0.5rem 0;
    }

    .hero {
        min-height: 90vh;
        padding-top: 50px;
    }

    .hero-content {
        padding: 1rem 0.5rem;
    }

    .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.95rem;
    }
}

/* Landscape Mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 80px 0 2rem;
    }

    .hero-title {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }

    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 1rem;
    }

    .hero-buttons {
        flex-direction: row;
        justify-content: center;
        gap: 1rem;
    }

    .hero-buttons .btn {
        width: auto;
        min-width: 150px;
    }
}
