:root {
    --primary: #2c3e50;
    --secondary: #005f87;
    --accent: #e67e22;
    --light: #ecf0f1;
    --dark: #2c3e50;
    --text: #333;
    --text-light: #7f8c8d;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    line-height: 1.6;
    color: var(--text);
    background-color: #f9f9f9;
}

header {
    background: var(--primary);
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

header.scrolled {
    padding: 0.5rem 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
}

.logo i {
    color: var(--accent);
    margin-right: 10px;
    font-size: 1.5rem;
}

.logo .tagline {
    font-size: 0.8rem;
    margin-left: 15px;
    font-weight: 400;
    color: #bdc3c7;
}

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

nav ul li {
    margin-left: 2rem;
    position: relative;
}

nav ul li a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 0;
    font-weight: 500;
    transition: color 0.3s ease;
}

nav ul li a:hover {
    color: var(--accent);
}

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

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

.active {
    color: var(--accent) !important;
}

.active::after {
    width: 100% !important;
}

main {
    padding: 8rem 2rem 4rem;
    min-height: 100vh;
    max-width: 1200px;
    margin: 0 auto;
}

/* Make sure the page container is properly hidden when inactive */
.page {
    display: none;
}

.page.active {
    display: block;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--dark);
    position: relative;
    display: inline-block;
}

h1::after {
    content: '';
    position: absolute;
    width: 50%;
    height: 4px;
    bottom: -10px;
    left: 0;
    background: var(--accent);
}

h2 {
    font-size: 1.8rem;
    margin: 1.5rem 0 1rem;
    color: var(--primary);
}

h3 {
    font-size: 1.4rem;
    margin: 1.2rem 0 0.8rem;
    color: var(--primary);
}

p {
    margin-bottom: 1rem;
    color: var(--text);
    font-size: 1.1rem;
}

.btn {
    display: inline-block;
    background: var(--secondary);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    margin-top: 1rem;
}

.btn:hover {
    background: #004a6a;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-accent {
    background: var(--accent);
}

.btn-accent:hover {
background: #d35400;
}

.hero {
    text-align: center;
    padding: 4rem 0;
    background: linear-gradient(rgba(44, 62, 80, 0.9), rgba(44, 62, 80, 0.9)), url('https://images.unsplash.com/photo-1605152276897-4f618f831968?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1350&q=80') no-repeat center center/cover;
    color: white;
    border-radius: 8px;
    margin-bottom: 3rem;
}

.hero h1 {
    color: white;
    font-size: 3rem;
}

.hero h1::after {
    background: var(--accent);
    width: 30%;
    left: 35%;
}

.hero p {
    color: var(--light);
    max-width: 800px;
    margin: 0 auto 2rem;
    font-size: 1.2rem;
}

.profile-section {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.profile-header {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 1.5rem;
}

.profile-title {
    flex: 1;
}

/* Clients banner styles */
.clients-banner {
    width: 100%;
    overflow: hidden;
    margin: 3rem 0;
    position: relative;
    background: rgba(0, 95, 135, 0.05);
    padding: 1.5rem 0;
    border-radius: 8px;
}

.clients-track {
    display: flex;
    align-items: center;
    animation: scroll 30s linear infinite;
    width: calc(250px * 12);
    /* Width of all items including duplicates */
}

.client-logo {
    flex: 0 0 auto;     /* don't shrink, don't stretch */
    padding: 0 1rem;    /* controls spacing between names */
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap; /* prevents wrapping */
    flex-shrink: 0;
    text-align: center;
    font-weight: 600;
    color: var(--secondary);
    font-size: 1.1rem;
}

.client-logo:not(:last-child)::after {
    content: '•';
    margin-left: 2rem;
    color: var(--accent);
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(calc(-250px * 6));
        /* Move by half the width */
    }
}

/* Pause animation on hover */
.clients-banner:hover .clients-track {
    animation-play-state: paused;
}

.contact-info {
    text-align: right;
}

.contact-info p {
    margin: 0.3rem 0;
    font-size: 0.9rem;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.skill-category {
    background: #f5f7fa;
    padding: 1.5rem;
    border-radius: 6px;
    border-left: 4px solid var(--secondary);
}

.skill-category h3 {
    margin-top: 0;
    color: var(--secondary);
}

.skill-category ul {
    list-style-position: inside;
    padding-left: 0;
}

.skill-category li {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.experience-item {
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
}

.experience-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.experience-header h3 {
    margin-bottom: 0;
}

.experience-date {
    color: var(--text-light);
    font-style: italic;
}

.experience-highlights {
    margin-top: 1rem;
}

.experience-highlights li {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

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

.qualification-item {
    background: #f5f7fa;
    padding: 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
}

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

.service-card {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-top: 4px solid var(--secondary);
}

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

.service-card i {
    font-size: 2.5rem;
    color: var(--secondary);
    margin-bottom: 1rem;
}

.project {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
    margin-bottom: 2rem;
}

.project:hover {
    transform: translateY(-5px);
}

.project-img {
    height: 200px;
    background: #ddd;
    background-size: cover;
    background-position: center;
}

.project-info {
    padding: 1.5rem;
}

.project h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.project-meta {
    display: flex;
    justify-content: space-between;
    color: var(--text-light);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.contact-form {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.form-group textarea {
    min-height: 150px;
}

/* Form success message styling */
.form-success {
    text-align: center;
    padding: 2rem;
}

.form-success i {
    font-size: 3rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

.form-success h3 {
    color: var(--primary);
    margin-bottom: 1rem;
}

footer {
    background: var(--primary);
    color: white;
    padding: 4rem 2rem 2rem;
    text-align: center;
}

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

.footer-section {
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: white;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 10px;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    width: 50px;
    height: 2px;
    bottom: 0;
    left: 0;
    background: var(--accent);
}

.footer-section p,
.footer-section a {
    color: #bdc3c7;
    margin-bottom: 0.8rem;
    display: block;
    transition: color 0.3s ease;
}

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

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

.contact-info i {
    margin-right: 10px;
    color: var(--accent);
    width: 20px;
    text-align: center;
}

.copyright {
    padding-top: 1rem;
    margin-top: 0rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #bdc3c7;
    font-size: 0.9rem;
}

/* Case study specific styles */
.case-study {
    scroll-margin-top: 100px;
}

.case-study.highlight {
    animation: highlight-pulse 1.5s ease;
}

@keyframes highlight-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(230, 126, 34, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(230, 126, 34, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(230, 126, 34, 0);
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

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

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

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

.delay-3 {
    transition-delay: 0.6s;
}

/* Responsive */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        padding: 1rem;
    }

    .logo {
        margin-bottom: 1rem;
        flex-direction: column;
        align-items: flex-start;
    }

    .logo .tagline {
        margin-left: 0;
        margin-top: 5px;
    }

    nav ul {
        width: 100%;
        justify-content: space-around;
        margin-top: 1rem;
    }

    nav ul li {
        margin: 0;
    }

    main {
        padding: 7rem 1rem 2rem;
    }

    h1 {
        font-size: 2rem;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .profile-header {
        flex-direction: column;
        text-align: center;
    }

    .contact-info {
        text-align: center;
        margin-top: 1rem;
    }

    .experience-header {
        flex-direction: column;
    }

    .experience-date {
        margin-top: 0.5rem;
    }
}