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

:root {
    --dark-navy: #00213a;
    --teal: #4ECDC4;
    --light-blue: #6FA3D0;
    --lime: #95D657;
    --mustard-gold: #F9C74F;
    --white: #FFFFFF;
    --gray-light: #F7F7F7;
    --gray-slate: #6B7280;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--dark-navy);
    overflow-x: hidden;
}

/* Header & Navigation */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--dark-navy);
    padding: 1rem 5%;
    z-index: 1000;
    transition: all 0.3s ease;
}

header.scrolled {
    border-bottom: 2px solid var(--mustard-gold);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.logo-container:hover {
    transform: scale(1.05);
}

.logo-shape {
    height: 60px;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
    letter-spacing: 1px;
}

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

.nav-links a {
    color: var(--white);
    text-decoration: none;
    position: relative;
    transition: color 0.3s ease;
    font-weight: 500;
}

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

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

/* Mobile Menu */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    z-index: 1001;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--white);
    margin: 3px 0;
    transition: 0.3s;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    background: var(--dark-navy);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    margin-top: 70px;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        repeating-linear-gradient(0deg, transparent, transparent 50px, rgba(78, 205, 196, 0.03) 50px, rgba(78, 205, 196, 0.03) 100px),
        repeating-linear-gradient(90deg, transparent, transparent 50px, rgba(111, 163, 208, 0.03) 50px, rgba(111, 163, 208, 0.03) 100px);
    pointer-events: none;
}

.circuit-traces {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0.1;
    pointer-events: none;
}

.hero-content {
    text-align: center;
    z-index: 2;
    padding: 2rem;
    animation: fadeInUp 1s ease;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: var(--white);
    font-weight: bold;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero p {
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    color: var(--white);
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary {
    background: var(--mustard-gold);
    color: var(--white);
    padding: 1rem 2rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(249, 199, 79, 0.4);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 30px;
    border: 2px solid var(--teal);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-secondary {
    color: var(--white);
    text-decoration: none;
    position: relative;
    font-weight: 500;
}

.btn-secondary::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--light-blue);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.btn-secondary:hover::after {
    transform: scaleX(1);
}

/* About Section */
.about {
    padding: 5rem 5%;
    background: var(--white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    align-items: center;
}

.portrait-frame {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    position: relative;
    margin: 0 auto;
    background: conic-gradient(
        from 0deg,
        var(--mustard-gold) 0deg 90deg,
        var(--teal) 90deg 180deg,
        var(--mustard-gold) 180deg 270deg,
        var(--teal) 270deg 360deg
    );
    padding: 5px;
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.portrait-frame img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    background: var(--gray-light);
}

.about-text h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--dark-navy);
}

.about-text p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: var(--gray-slate);
}

.features {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.feature-icon {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

/* Services Section */
.services {
    padding: 5rem 5%;
    background: var(--gray-light);
    position: relative;
}

.services::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 35px,
        rgba(78, 205, 196, 0.02) 35px,
        rgba(78, 205, 196, 0.02) 70px
    );
    pointer-events: none;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--dark-navy);
}

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

.service-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 4px solid transparent;
    background-image: 
        linear-gradient(white, white),
        linear-gradient(to right, var(--teal) 0%, var(--light-blue) 25%, var(--lime) 50%, var(--mustard-gold) 75%, var(--teal) 100%);
    background-origin: border-box;
    background-clip: padding-box, border-box;
}

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

.service-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.service-icon:nth-child(1) { background: var(--teal); }
.service-icon:nth-child(2) { background: var(--light-blue); }
.service-icon:nth-child(3) { background: var(--lime); }
.service-icon:nth-child(4) { background: var(--mustard-gold); }

.service-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--dark-navy);
}

.service-card p {
    color: var(--gray-slate);
    margin-bottom: 1rem;
}

.service-link {
    color: var(--mustard-gold);
    text-decoration: none;
    font-weight: 600;
    position: relative;
}

.service-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 2"><path d="M0,1 Q20,0 40,1 T80,1 T100,1" stroke="%23F9C74F" fill="none" stroke-width="2"/></svg>');
    transition: width 0.3s ease;
}

.service-link:hover::after {
    width: 100%;
}

/* Projects Section */
.projects {
    padding: 5rem 5%;
    background: var(--dark-navy);
    overflow: hidden;
}

.projects .section-title {
    color: var(--white);
}

.carousel {
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    padding: 2rem 0;
    scroll-snap-type: x mandatory;
}

.project-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.3s ease;
    scroll-snap-align: start;
}

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

.project-card {
    min-width: 600px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    border: 2px solid;
    border-image: linear-gradient(to right, var(--teal), var(--light-blue), var(--lime), var(--mustard-gold)) 1;
}

.project-screenshot {
    background-color: var(--gray-slate);
    border-radius: 5px;
    height: 200px;
    position: relative;
    background-size: cover;
    background-position: center;
}

.project-screenshot::before,
.project-screenshot::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--mustard-gold);
    border-radius: 50%;
}

.project-screenshot::before {
    top: -5px;
    left: -5px;
}

.project-screenshot::after {
    bottom: -5px;
    right: -5px;
}

.project-info {
    color: var(--white);
}

.project-info h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.project-info p {
    opacity: 0.9;
    margin-bottom: 1rem;
}

.project-chart {
    height: 100px;
    background: rgba(78, 205, 196, 0.1);
    border-radius: 5px;
    position: relative;
    overflow: hidden;
}

.view-all-projects-container {
    text-align: center;
    margin-top: 2rem;
}

/* Projects Page (projects.html) */
.projects-page {
    padding: 120px 5% 5rem; /* Add padding-top to account for fixed header */
    background: var(--gray-light);
}

.projects-page .section-title {
    margin-bottom: 3rem;
}

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

.project-grid-item {
    display: block;
    text-decoration: none;
    color: var(--dark-navy);
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-grid-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.project-grid-image {
    height: 200px;
    background-color: var(--gray-slate);
    background-size: cover;
    background-position: center;
}

.project-grid-content {
    padding: 1.5rem;
}

.project-grid-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--dark-navy);
}

.project-grid-content p {
    color: var(--gray-slate);
    font-size: 1rem;
}

/* Project Detail Page */
.project-detail-page {
    padding: 120px 5% 5rem;
    background: var(--white);
}

.project-detail-header {
    text-align: center;
    margin-bottom: 3rem;
    border-bottom: 1px solid var(--gray-light);
    padding-bottom: 2rem;
}

.project-detail-header h1 {
    font-size: 3rem;
    color: var(--dark-navy);
    margin-bottom: 0.5rem;
}

.project-detail-header .project-subtitle {
    font-size: 1.2rem;
    color: var(--gray-slate);
}

.project-detail-content {
    max-width: 900px;
    margin: 0 auto;
}

img.project-detail-image {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 10px;
    margin-bottom: 2rem;
}

div.project-detail-image {
    width: 100%;
    height: 400px;
    background-color: var(--gray-slate);
    border-radius: 10px;
    margin-bottom: 2rem;
    background-size: cover;
    background-position: center;
}

.project-detail-section {
    margin-bottom: 2rem;
}

.project-detail-section h2 {
    font-size: 1.75rem;
    color: var(--dark-navy);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--teal);
    display: inline-block;
}

.project-detail-section p, .project-detail-section ul {
    font-size: 1.1rem;
    color: var(--gray-slate);
    line-height: 1.8;
}

.project-detail-section ul {
    list-style-position: inside;
    padding-left: 1rem;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tech-tag {
    background: var(--gray-light);
    color: var(--gray-slate);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.9rem;
}

.back-to-projects {
    display: inline-block;
    margin-top: 3rem;
    color: var(--teal);
    text-decoration: none;
    font-weight: 600;
}

.back-to-projects:hover {
    text-decoration: underline;
}

/* Process Section */
.process {
    padding: 5rem 5%;
    background: var(--white);
    position: relative;
}

.timeline {
    display: flex;
    justify-content: space-around;
    align-items: center;
    position: relative;
    margin-top: 3rem;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--teal);
    z-index: 0;
}

.process-step {
    text-align: center;
    position: relative;
    z-index: 1;
}

.step-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--white);
    position: relative;
    transition: transform 0.3s ease;
}

.step-icon:nth-child(1) { background: var(--teal); }
.step-icon:nth-child(2) { background: var(--light-blue); }
.step-icon:nth-child(3) { background: var(--lime); }
.step-icon:nth-child(4) { background: var(--mustard-gold); }

.process-step:hover .step-icon {
    transform: scale(1.1);
}

.step-label {
    font-weight: 600;
    color: var(--dark-navy);
}

/* Team Section */
.team {
    padding: 5rem 5%;
    background: var(--gray-light);
}

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

.team-member {
    text-align: center;
}

.member-photo {
    width: 150px;
    height: 150px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.member-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: var(--gray-slate);
}

.member-photo::before {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    padding: 5px;
    background: linear-gradient(45deg, var(--teal), var(--light-blue), var(--lime), var(--mustard-gold));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.team-member:hover .member-photo::before {
    opacity: 1;
}

.team-member:hover .member-photo {
    transform: scale(1.05);
}

.member-name {
    font-weight: 600;
    color: var(--dark-navy);
    margin-bottom: 0.25rem;
}

.member-role {
    color: var(--gray-slate);
    font-size: 0.9rem;
}

/* CTA Section */
.cta {
    padding: 5rem 5%;
    background: var(--mustard-gold);
    position: relative;
    overflow: hidden;
}

.cta-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.cta h2 {
    font-size: 2rem;
    color: var(--white);
    margin-bottom: 1rem;
}

.btn-dark {
    background: var(--dark-navy);
    color: var(--white);
    padding: 1rem 2rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-dark:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 33, 58, 0.3);
}

.brain-illustration {
    width: 200px;
    height: 200px;
    position: relative;
    animation: floating 3s ease-in-out infinite;
    will-change: transform;
}

@keyframes floating {
    0%, 100% { transform: translate3d(0, 0, 0); }
    50% { transform: translate3d(0, -20px, 0); }
}

/* Footer */
footer {
    background: var(--dark-navy);
    padding: 3rem 5% 0;
    color: var(--white);
}

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

.footer-section h3 {
    margin-bottom: 1rem;
    color: var(--white);
}

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

.footer-section a {
    color: var(--white);
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s ease;
    position: relative;
}

.footer-section a:hover {
    opacity: 1;
}

.footer-section a:hover::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--mustard-gold);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--light-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--white);
    position: relative;
    transition: all 0.3s ease;
}

.social-icon::before {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    background: var(--mustard-gold);
    border-radius: 50%;
    top: -3px;
    right: -3px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.social-icon:hover {
    background: var(--mustard-gold);
    transform: scale(1.1);
}

.social-icon:hover::before {
    opacity: 1;
}

.footer-bottom {
    height: 30px;
    background: repeating-linear-gradient(
        to right,
        var(--teal) 0px,
        var(--teal) 30px,
        var(--light-blue) 30px,
        var(--light-blue) 60px,
        var(--lime) 60px,
        var(--lime) 90px,
        var(--mustard-gold) 90px,
        var(--mustard-gold) 120px
    );
}

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

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Circuit Animation */
.circuit-animation {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.1;
}

.circuit-dot {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--teal);
    border-radius: 50%;
    animation: moveDot 5s linear infinite;
}

@keyframes moveDot {
    0% { transform: translate(0, 0); }
    100% { transform: translate(100vw, 0); }
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--dark-navy);
        flex-direction: column;
        align-items: center;
        padding: 2rem 0;
        gap: 1.5rem;
        border-top: 1px solid rgba(249, 199, 79, 0.5);
        opacity: 0;
        transform: translateY(-20px);
        pointer-events: none;
        transition: opacity 0.3s ease, transform 0.3s ease;
    }

    .nav-links.active {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }

    .nav-links a {
        padding: 0.5rem 1rem;
    }

    .menu-toggle {
        display: flex;
    }

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

    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .project-card {
        min-width: 0;
        width: 80vw;
        max-width: 400px;
        grid-template-columns: 1fr;
    }

    .timeline {
        flex-direction: column;
    }

    .timeline::before {
        top: 0;
        bottom: 0;
        left: 50%;
        width: 4px;
        height: auto;
    }

    .cta-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

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

    .social-links {
        justify-content: center;
    }
}
