/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Primary color palette */
    --primary-color: #1e4d78;     /* Deep blue - engineering/professionalism */
    --secondary-color: #3498db;    /* Lighter blue - technology/innovation */
    --accent-color: #27ae60;      /* Green - growth/solutions */
    --dark-color: #2c3e50;        /* Dark slate - stability */
    --light-color: #ecf0f1;       /* Light gray - clarity */
    
    /* Text colors */
    --text-dark: #2c3e50;
    --text-light: #ecf0f1;
    --text-muted: #7f8c8d;
}

body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: #fff;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

h2 {
    text-align: center;
    margin-bottom: 2.5rem;
    position: relative;
    font-size: 2.2rem;
}

h2:after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--secondary-color);
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

p {
    margin-bottom: 1rem;
}

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

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

section {
    padding: 5rem 2rem;
}

/* Header styles */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.logo {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: -1px;
    line-height: 1;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
}

.tagline {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-top: -5px;
}

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

nav a {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    color: var(--text-dark);
    position: relative;
}

nav a:hover {
    color: var(--secondary-color);
}

nav a:after {
    content: '';
    display: block;
    width: 0;
    height: 2px;
    background: var(--secondary-color);
    transition: width 0.3s;
    position: absolute;
    bottom: -5px;
    left: 0;
}

nav a:hover:after {
    width: 100%;
}

.contact-btn {
    background-color: var(--accent-color);
    color: white !important;
    padding: 0.5rem 1.2rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.contact-btn:hover {
    background-color: #219653;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(39, 174, 96, 0.2);
}

.contact-btn:after {
    display: none;
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    }
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Hero section */
.hero {
    background: linear-gradient(-45deg, var(--primary-color), var(--dark-color), #17395c, #2980b9);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    color: var(--text-light);
    padding: 8rem 2rem;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml;utf8,<svg width="100" height="100" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><rect x="0" y="0" width="100" height="100" fill="none"/><path d="M0 50 L50 0 L100 50 L50 100 Z" fill="rgba(255,255,255,0.05)"/></svg>');
    background-size: 80px 80px;
    opacity: 0.4;
    animation: float 6s ease-in-out infinite;
}

.hero:after {
    content: '';
    position: absolute;
    width: 900px;
    height: 900px;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0) 70%);
    top: -400px;
    right: -400px;
    border-radius: 50%;
    animation: pulse 10s infinite;
}

/* Particle animations */
@keyframes float-particle {
    0% {
        transform: translateY(0) translateX(0) rotate(0deg);
        opacity: 0.5;
    }
    50% {
        transform: translateY(-50px) translateX(50px) rotate(45deg);
        opacity: 1;
    }
    100% {
        transform: translateY(0) translateX(0) rotate(0deg);
        opacity: 0.5;
    }
}

.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.particle {
    position: absolute;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float-particle 15s infinite linear;
}

.particle:nth-child(1) {
    top: 20%;
    left: 10%;
    width: 15px;
    height: 15px;
    background: rgba(52, 152, 219, 0.15);
    animation-duration: 25s;
    animation-delay: 0s;
}

.particle:nth-child(2) {
    top: 40%;
    left: 25%;
    width: 25px;
    height: 25px;
    background: rgba(255, 255, 255, 0.08);
    animation-duration: 20s;
    animation-delay: 2s;
}

.particle:nth-child(3) {
    top: 60%;
    left: 15%;
    width: 18px;
    height: 18px;
    background: rgba(39, 174, 96, 0.12);
    animation-duration: 22s;
    animation-delay: 1s;
}

.particle:nth-child(4) {
    top: 30%;
    left: 70%;
    width: 12px;
    height: 12px;
    background: rgba(52, 152, 219, 0.1);
    animation-duration: 18s;
    animation-delay: 3s;
}

.particle:nth-child(5) {
    top: 65%;
    left: 60%;
    width: 22px;
    height: 22px;
    background: rgba(255, 255, 255, 0.06);
    animation-duration: 24s;
    animation-delay: 0.5s;
}

.particle:nth-child(6) {
    top: 15%;
    left: 85%;
    width: 16px;
    height: 16px;
    background: rgba(39, 174, 96, 0.08);
    animation-duration: 21s;
    animation-delay: 2.5s;
}

.particle:nth-child(7) {
    top: 50%;
    left: 40%;
    width: 20px;
    height: 20px;
    background: rgba(52, 152, 219, 0.12);
    animation-duration: 23s;
    animation-delay: 1.5s;
}

.particle:nth-child(8) {
    top: 75%;
    left: 80%;
    width: 14px;
    height: 14px;
    background: rgba(255, 255, 255, 0.1);
    animation-duration: 19s;
    animation-delay: 4s;
}

.particle:nth-child(9) {
    top: 35%;
    left: 50%;
    width: 17px;
    height: 17px;
    background: rgba(39, 174, 96, 0.1);
    animation-duration: 26s;
    animation-delay: 0.2s;
}

.particle:nth-child(10) {
    top: 10%;
    left: 30%;
    width: 13px;
    height: 13px;
    background: rgba(52, 152, 219, 0.15);
    animation-duration: 18s;
    animation-delay: 3.5s;
}

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

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    color: white;
    line-height: 1.2;
    opacity: 0;
    animation: fadeInUp 1s ease forwards;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0;
    animation: fadeInUp 1s ease 0.3s forwards;
}

.cta-button {
    display: inline-block;
    background-color: var(--accent-color);
    color: white;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 1.1rem;
    padding: 0.8rem 2rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    /* Initial animation to fade in only once */
    opacity: 0;
    animation: fadeInUp 1s ease 0.6s forwards;
}

.cta-button:hover {
    background-color: #219653;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    color: white;
}

/* Services section */
.services {
    background-color: #f8f9fa;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.service-card {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    text-align: center;
    transform: translateY(40px);
    opacity: 0;
}

.service-card.animate {
    animation: fadeInUp 0.6s ease forwards;
}

.service-card:nth-child(1).animate { animation-delay: 0.1s; }
.service-card:nth-child(2).animate { animation-delay: 0.3s; }
.service-card:nth-child(3).animate { animation-delay: 0.5s; }
.service-card:nth-child(4).animate { animation-delay: 0.7s; }

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.service-card i {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.service-card:hover i {
    transform: scale(1.2);
    color: var(--accent-color);
}

.service-card h3 {
    margin-bottom: 1rem;
    color: var(--dark-color);
    transition: color 0.3s ease;
}

.service-card:hover h3 {
    color: var(--secondary-color);
}

/* Projects section */
.projects {
    background-color: white;
}

.project-cards {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 3rem;
}

.project-card {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(50px);
}

.project-card.animate {
    animation: fadeInUp 0.8s ease forwards;
}

.project-card:nth-child(1).animate { animation-delay: 0.2s; }
.project-card:nth-child(2).animate { animation-delay: 0.5s; }

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.project-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
    position: relative;
}

.project-image:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.4) 0%, rgba(30, 77, 120, 0.1) 100%);
    opacity: 0;
    z-index: 1;
    transition: all 0.4s ease;
}

.project-card:hover .project-image:before {
    opacity: 1;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.project-info {
    padding: 1.5rem;
    position: relative;
    transition: all 0.3s ease;
}

.project-info:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(to right, var(--secondary-color), var(--accent-color));
    transition: width 0.4s ease;
}

.project-card:hover .project-info:after {
    width: 100%;
}

.project-info h3 {
    color: var(--dark-color);
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.project-card:hover .project-info h3 {
    color: var(--secondary-color);
}

/* About section */
.about {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    max-width: 1200px;
    margin: 0 auto;
    padding: 5rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

/* Contact section */
.contact {
    background-color: var(--light-color);
    text-align: center;
}

.contact p {
    max-width: 700px;
    margin: 0 auto 3rem auto;
}

.contact-form {
    max-width: 800px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.form-group {
    text-align: left;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark-color);
}

input, textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: 'Open Sans', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.submit-btn {
    grid-column: 1 / -1;
    background-color: var(--primary-color);
    color: white;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.submit-btn:hover {
    background-color: #17395c;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(30, 77, 120, 0.2);
}

/* Footer */
footer {
    background-color: var(--dark-color);
    color: var(--text-light);
    padding: 4rem 2rem 2rem;
}

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

.footer-logo .logo {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.footer-links h4, .footer-contact h4 {
    color: var(--light-color);
    margin-bottom: 1.2rem;
    font-size: 1.2rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: #bdc3c7;
    transition: color 0.3s ease;
}

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

.footer-contact p {
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
}

.footer-contact i {
    margin-right: 0.8rem;
    color: var(--secondary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    color: #7f8c8d;
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
    header {
        flex-direction: column;
        padding: 1rem;
    }
    
    .logo-container {
        margin-bottom: 1rem;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
    
    .hero {
        padding: 5rem 1rem;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    section {
        padding: 3rem 1rem;
    }
    
    .about {
        padding: 3rem 1.5rem;
    }
    
    .contact-form {
        grid-template-columns: 1fr;
    }
}
