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

:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --secondary-color: #64748b;
    --text-color: #1e293b;
    --text-light: #64748b;
    --bg-color: #ffffff;
    --bg-light: #f8fafc;
    --bg-dark: #0f172a;
    --border-color: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --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-color);
    overflow-x: hidden;
}

/* Skip to content link for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
    border-radius: 0 0 4px 0;
}

.skip-link:focus {
    top: 0;
}

.container {
    max-width: 1500px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header / Navigation */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    z-index: 1000;
    transition: var(--transition);
}

.navbar {
    padding: 1rem 0;
}

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

.logo a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    transition: var(--transition);
}

.logo-img {
    height: 40px;
    width: auto;
    transition: var(--transition);
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

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

.logo a:hover .logo-text {
    background: linear-gradient(135deg, #5568d3 0%, #6a3d8f 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

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

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link:hover {
    color: #667eea;
}

.nav-link.active {
    color: var(--text-color);
}

/* Focus states removed - user preference */

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

.menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    transition: var(--transition);
    border-radius: 2px;
    transform-origin: center;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding-top: 80px;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.2);
    z-index: 1;
}

/* Interactive tech background */
.hero-tech-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.tech-svg {
    width: 100%;
    height: 100%;
    opacity: 0.3;
    transition: opacity 0.3s ease;
}

.tech-node {
    fill: rgba(255, 255, 255, 0.4);
    transform-origin: center;
    animation: floatNode 8s ease-in-out infinite;
}

/* Different animation durations and delays for more randomness */
.tech-node:nth-child(odd) {
    animation-duration: 10s;
    animation-delay: -2s;
    animation-name: floatNodeAlt1;
}

.tech-node:nth-child(3n) {
    animation-duration: 12s;
    animation-delay: -4s;
    animation-name: floatNodeAlt2;
}

.tech-node:nth-child(4n) {
    animation-duration: 9s;
    animation-delay: -1s;
    animation-name: floatNodeAlt3;
}

.tech-node:nth-child(5n) {
    animation-duration: 11s;
    animation-delay: -3s;
    animation-name: floatNodeAlt4;
}

.tech-node:nth-child(7n) {
    animation-duration: 13s;
    animation-delay: -5s;
}

/* Floating animations for nodes - different directions */
@keyframes floatNode {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.4;
    }
    25% {
        transform: translate(8px, -12px) scale(1.1);
        opacity: 0.6;
    }
    50% {
        transform: translate(-6px, 8px) scale(0.95);
        opacity: 0.5;
    }
    75% {
        transform: translate(10px, 6px) scale(1.05);
        opacity: 0.55;
    }
}

@keyframes floatNodeAlt1 {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.4;
    }
    25% {
        transform: translate(-10px, 8px) scale(1.05);
        opacity: 0.55;
    }
    50% {
        transform: translate(12px, -6px) scale(0.9);
        opacity: 0.45;
    }
    75% {
        transform: translate(-8px, -10px) scale(1.08);
        opacity: 0.6;
    }
}

@keyframes floatNodeAlt2 {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.4;
    }
    25% {
        transform: translate(6px, 14px) scale(1.12);
        opacity: 0.58;
    }
    50% {
        transform: translate(-14px, -4px) scale(0.92);
        opacity: 0.48;
    }
    75% {
        transform: translate(9px, 7px) scale(1.03);
        opacity: 0.52;
    }
}

@keyframes floatNodeAlt3 {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.4;
    }
    25% {
        transform: translate(-12px, -8px) scale(1.07);
        opacity: 0.57;
    }
    50% {
        transform: translate(7px, 11px) scale(0.93);
        opacity: 0.47;
    }
    75% {
        transform: translate(-5px, 13px) scale(1.09);
        opacity: 0.59;
    }
}

@keyframes floatNodeAlt4 {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.4;
    }
    25% {
        transform: translate(11px, 9px) scale(1.06);
        opacity: 0.56;
    }
    50% {
        transform: translate(-9px, -11px) scale(0.94);
        opacity: 0.46;
    }
    75% {
        transform: translate(13px, -7px) scale(1.04);
        opacity: 0.54;
    }
}

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

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s ease;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    opacity: 0.95;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    animation: fadeInUp 0.8s ease 0.4s both;
}

.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5568d3 0%, #6a3d8f 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

/* Loading spinner for form button */
.spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

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

/* Hero button - white background for better visibility on gradient */
.hero .btn-primary {
    background: white !important;
    color: #667eea;
}

.hero .btn-primary:hover {
    background: var(--bg-light) !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Contact form button - with subtle hover animation */
.contact-form .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Section Styles */
section {
    padding: 2rem 0 4rem 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-color);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

/* About Section */
.about {
    background-color: var(--bg-light);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-text {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: var(--text-light);
}

/* Services Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    max-width: 1300px;
    margin-left: auto;
    margin-right: auto;
}

/* Limit to 2 columns on larger screens for better readability */
@media (min-width: 1000px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.service-card {
    background-color: white;
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    box-shadow: var(--shadow);
    transition: var(--transition);
    opacity: 0;
    transform: translateY(20px);
    display: flex;
    flex-direction: column;
}

.service-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-align: center;
}

.service-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-color);
    text-align: center;
}

.service-description {
    color: var(--text-light);
    line-height: 1.8;
    text-align: left;
    flex-grow: 1;
}

.service-description strong {
    color: var(--text-color);
    font-weight: 600;
    display: block;
    margin-top: 0.5rem;
    margin-bottom: 0.25rem;
}

.service-description strong:first-child {
    margin-top: 0;
}

/* Contact Section */
.contact {
    background-color: var(--bg-light);
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.contact-info h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.contact-item {
    margin-bottom: 1rem;
}

.contact-item strong {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.contact-item p {
    color: var(--text-light);
}

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

.contact-item a:hover {
    color: #475569;
    text-decoration: underline;
}

/* Contact Form */
.contact-form {
    background-color: white;
    padding: 1.25rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.5rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
    min-height: 60px;
    max-height: 140px;
}

.error-message {
    display: block;
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.1rem;
    min-height: 0.5rem;
}

.form-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    display: none;
}

.form-message.success {
    display: block;
    background-color: #d1fae5;
    color: #065f46;
}

.form-message.error {
    display: block;
    background-color: #fee2e2;
    color: #991b1b;
}

/* Footer */
.footer {
    background-color: var(--bg-dark);
    color: white;
    padding: 3rem 0 1rem;
}

.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;
}

/* Center middle column, align right column */
.footer-section:nth-child(2) {
    text-align: center;
}

.footer-section:nth-child(3) {
    text-align: right;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.5rem;
}

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

.footer-section:nth-child(2) ul {
    display: inline-block;
    text-align: center;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

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

.footer-section a:hover {
    color: white;
}

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

/* Scroll to top button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    z-index: 999;
    transition: var(--transition);
    opacity: 0;
    transform: translateY(20px);
}

.scroll-to-top.visible {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

.scroll-to-top:hover {
    background: linear-gradient(135deg, #5568d3 0%, #6a3d8f 100%);
    transform: translateY(-3px);
    box-shadow: 0 15px 20px -5px rgba(0, 0, 0, 0.2);
}

.scroll-to-top:focus {
    outline: none;
}

.scroll-to-top svg {
    width: 20px;
    height: 20px;
}

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

.fade-in {
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
}

/* Responsive Design */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: var(--transition);
        box-shadow: var(--shadow-lg);
        padding: 2rem 0;
        gap: 0;
    }

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

    .nav-menu li {
        padding: 1rem 0;
    }

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

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

    .menu-toggle.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

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

    .hero-subtitle {
        font-size: 1.2rem;
    }

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

    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .service-card {
        padding: 1.5rem;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
    }
    
    .contact-info {
        text-align: center;
    }
    
    .contact-info h3 {
        display: none;
    }

    section {
        padding: 3rem 0;
    }
    
    /* Larger tech nodes on mobile - adjust animations */
    .tech-node {
        animation: floatNodeMobile 8s ease-in-out infinite;
    }
    
    .tech-node:nth-child(odd) {
        animation: floatNodeAlt1Mobile 10s ease-in-out infinite;
        animation-delay: -2s;
    }
    
    .tech-node:nth-child(3n) {
        animation: floatNodeAlt2Mobile 12s ease-in-out infinite;
        animation-delay: -4s;
    }
    
    .tech-node:nth-child(4n) {
        animation: floatNodeAlt3Mobile 9s ease-in-out infinite;
        animation-delay: -1s;
    }
    
    .tech-node:nth-child(5n) {
        animation: floatNodeAlt4Mobile 11s ease-in-out infinite;
        animation-delay: -3s;
    }
    
    /* Footer - vertical layout, center aligned */
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-section {
        text-align: center !important;
    }
    
    .footer-section:nth-child(2) ul {
        text-align: center;
    }
}

@keyframes floatNodeMobile {
    0%, 100% {
        transform: translate(0, 0) scale(2);
        opacity: 0.4;
    }
    25% {
        transform: translate(8px, -12px) scale(2.2);
        opacity: 0.6;
    }
    50% {
        transform: translate(-6px, 8px) scale(1.9);
        opacity: 0.5;
    }
    75% {
        transform: translate(10px, 6px) scale(2.1);
        opacity: 0.55;
    }
}

@keyframes floatNodeAlt1Mobile {
    0%, 100% {
        transform: translate(0, 0) scale(2);
        opacity: 0.4;
    }
    25% {
        transform: translate(-10px, 8px) scale(2.1);
        opacity: 0.55;
    }
    50% {
        transform: translate(12px, -6px) scale(1.8);
        opacity: 0.45;
    }
    75% {
        transform: translate(-8px, -10px) scale(2.16);
        opacity: 0.6;
    }
}

@keyframes floatNodeAlt2Mobile {
    0%, 100% {
        transform: translate(0, 0) scale(2);
        opacity: 0.4;
    }
    25% {
        transform: translate(6px, 14px) scale(2.24);
        opacity: 0.58;
    }
    50% {
        transform: translate(-14px, -4px) scale(1.84);
        opacity: 0.48;
    }
    75% {
        transform: translate(9px, 7px) scale(2.06);
        opacity: 0.52;
    }
}

@keyframes floatNodeAlt3Mobile {
    0%, 100% {
        transform: translate(0, 0) scale(2);
        opacity: 0.4;
    }
    25% {
        transform: translate(-12px, -8px) scale(2.14);
        opacity: 0.57;
    }
    50% {
        transform: translate(7px, 11px) scale(1.86);
        opacity: 0.47;
    }
    75% {
        transform: translate(-5px, 13px) scale(2.18);
        opacity: 0.59;
    }
}

@keyframes floatNodeAlt4Mobile {
    0%, 100% {
        transform: translate(0, 0) scale(2);
        opacity: 0.4;
    }
    25% {
        transform: translate(11px, 9px) scale(2.12);
        opacity: 0.56;
    }
    50% {
        transform: translate(-9px, -11px) scale(1.88);
        opacity: 0.46;
    }
    75% {
        transform: translate(13px, -7px) scale(2.08);
        opacity: 0.54;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

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

    .container {
        padding: 0 15px;
    }

    .contact-form {
        padding: 1.5rem;
    }
}

