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

:root {
    --primary-color: #0066cc;
    --secondary-color: #004c99;
    --dark-color: #1a1a1a;
    --light-color: #f8f9fa;
    --text-color: #333;
    --accent-color: #00d4ff;
    --bg-color: #ffffff;
    --card-bg: #ffffff;
    --nav-bg: #ffffff;
    --section-bg: #f8f9fa;
}

[data-theme="dark"] {
    --primary-color: #3399ff;
    --secondary-color: #0066cc;
    --dark-color: #f8f9fa;
    --light-color: #1a1a1a;
    --text-color: #e0e0e0;
    --accent-color: #00d4ff;
    --bg-color: #0a0a0a;
    --card-bg: #1a1a1a;
    --nav-bg: #0f0f0f;
    --section-bg: #141414;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    transition: background-color 0.3s ease, color 0.3s ease;
    position: relative;
    overflow-x: hidden;
}

/* Animated Background Elements */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background:
        radial-gradient(circle at 20% 30%, rgba(0, 102, 204, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(0, 212, 255, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(51, 153, 255, 0.05) 0%, transparent 50%);
    animation: gradientShift 20s ease infinite;
    pointer-events: none;
}

[data-theme="dark"] body::before {
    background:
        radial-gradient(circle at 20% 30%, rgba(51, 153, 255, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(0, 212, 255, 0.10) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(0, 102, 204, 0.08) 0%, transparent 50%);
}

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

[data-theme="dark"] body::after {
    background-image:
        linear-gradient(rgba(51, 153, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(51, 153, 255, 0.05) 1px, transparent 1px);
}

@keyframes gradientShift {
    0%, 100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.1) rotate(5deg);
    }
}

/* Navigation */
nav {
    background: var(--nav-bg);
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

[data-theme="light"] nav {
    background: rgba(255, 255, 255, 0.95);
}

[data-theme="dark"] nav {
    background: rgba(15, 15, 15, 0.95);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-color);
    position: relative;
    min-height: 60px;
    min-width: 180px;
}

.logo-img {
    height: 60px;
    width: auto;
    transition: opacity 0.3s ease;
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    max-width: 180px;
    object-fit: contain;
}

/* Light mode: use grayscale logo for better contrast */
.logo-color {
    opacity: 0;
}

.logo-grayscale {
    opacity: 1;
}

[data-theme="light"] .logo-color {
    opacity: 0;
}

[data-theme="light"] .logo-grayscale {
    opacity: 1;
}

/* Dark mode: use color logo with brightness enhancement */
[data-theme="dark"] .logo-color {
    opacity: 1;
    filter: brightness(1.8) saturate(1.2);
}

[data-theme="dark"] .logo-grayscale {
    opacity: 0;
}

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

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

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

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

.nav-links a:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 4px;
    color: var(--primary-color);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.hamburger .material-symbols-outlined {
    font-size: 28px;
    color: var(--text-color);
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 150px 2rem 100px;
    text-align: center;
    margin-top: 70px;
    position: relative;
    overflow: hidden;
}

.hero-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.4;
    pointer-events: none;
}

.pipeline-animation {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.mobile-animation {
    display: none;
}

.desktop-animation {
    display: block;
}

.pipeline {
    stroke-dasharray: 10 5;
    animation: dashAnimation 20s linear infinite;
}

.data-particle {
    filter: drop-shadow(0 0 3px rgba(255,255,255,0.8));
}

.webapp-portal {
    transform-origin: center;
    animation: portalPulse 3s ease-in-out infinite;
}

@keyframes dashAnimation {
    to {
        stroke-dashoffset: -1000;
    }
}

@keyframes portalPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.7;
    }
    50% {
        transform: scale(1.02);
        opacity: 0.9;
    }
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s ease-out;
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

.cta-button {
    display: inline-block;
    padding: 1.25rem 3rem;
    background: white;
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: fadeInUp 0.8s ease-out 0.4s backwards;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(0, 102, 204, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.cta-button:hover::before {
    width: 300px;
    height: 300px;
}

.cta-button:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.cta-button:focus {
    outline: 3px solid white;
    outline-offset: 4px;
    transform: translateY(-3px);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Section */
section {
    padding: 80px 2rem;
}

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

/* Services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.service-card {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 15px;
    border: 2px solid transparent;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.service-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card:focus-within {
    outline: 3px solid var(--primary-color);
    outline-offset: 4px;
}

.service-card h3 {
    color: var(--primary-color);
    font-size: 1.6rem;
    margin-bottom: 1rem;
    font-weight: 600;
    transition: color 0.3s ease;
}

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

.service-card p {
    line-height: 1.8;
    color: var(--text-color);
}

.service-card .tech-term {
    color: var(--primary-color);
    font-weight: 600;
    opacity: 1;
    text-decoration: underline;
    text-decoration-color: transparent;
    text-decoration-thickness: 2px;
    transition: text-decoration-color 0.3s ease;
}

.service-card:hover .tech-term {
    text-decoration-color: var(--primary-color);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    transition: transform 0.4s ease;
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(5deg);
}

.service-icon .material-symbols-outlined {
    font-size: 4rem;
    color: var(--primary-color);
    font-variation-settings:
        'FILL' 0,
        'wght' 300,
        'GRAD' 0,
        'opsz' 48;
    transition: color 0.3s ease;
}

.service-card:hover .service-icon .material-symbols-outlined {
    color: var(--accent-color);
}

/* About */
#about {
    background: var(--section-bg);
    transition: background-color 0.3s ease;
}

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

.about-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.skills {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.skill-tag {
    background: var(--card-bg);
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    font-weight: 500;
    color: var(--primary-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease;
}

/* Contact */
#contact {
    background: var(--bg-color);
    color: var(--text-color);
    padding: 100px 2rem;
}

#contact h2 {
    color: var(--primary-color);
    margin-bottom: 2rem;
}

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

.contact-content p {
    font-size: 1.15rem;
    line-height: 1.8;
    margin-bottom: 2.5rem;
    color: var(--text-color);
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 3rem;
}

.contact-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    font-size: 1.15rem;
    padding: 1.25rem 2rem;
    background: var(--card-bg);
    border-radius: 15px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.contact-item:hover {
    transform: translateX(10px);
    border-color: var(--primary-color);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.contact-item:focus-within {
    outline: 3px solid var(--primary-color);
    outline-offset: 4px;
}

.contact-item a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.contact-item a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.contact-item:hover a {
    color: var(--accent-color);
}

.contact-item:hover a::after {
    width: 100%;
    background: var(--accent-color);
}

.contact-item .material-symbols-outlined {
    font-size: 1.75rem;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.contact-item:hover .material-symbols-outlined {
    color: var(--accent-color);
    transform: scale(1.15);
}

/* Footer */
footer {
    background: #0a0a0a;
    color: white;
    text-align: center;
    padding: 2rem;
}

/* Language Toggle */
.lang-toggle {
    background: var(--card-bg);
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 50px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: bold;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 50px;
    justify-content: center;
}

.lang-toggle:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.05);
}

.lang-toggle:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 3px;
}

/* Theme Toggle */
.theme-toggle {
    background: var(--card-bg);
    border: none;
    color: var(--text-color);
    border-radius: 50px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.theme-toggle .material-symbols-outlined {
    font-size: 1.3rem;
    color: var(--text-color);
}

.theme-toggle:hover {
    background: var(--primary-color);
    transform: scale(1.05);
}

.theme-toggle:hover .material-symbols-outlined {
    color: white;
}

.theme-toggle:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 3px;
}

/* Hamburger focus */
.hamburger:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 3px;
    border-radius: 8px;
}

/* Floating Background Shapes */
.bg-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
    pointer-events: none;
}

.shape {
    position: absolute;
    opacity: 0.08;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
}

[data-theme="dark"] .shape {
    opacity: 0.12;
}

.shape-1 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    top: 10%;
    left: -10%;
    animation: float1 25s infinite;
}

.shape-2 {
    width: 200px;
    height: 200px;
    background: linear-gradient(225deg, var(--accent-color), var(--secondary-color));
    border-radius: 63% 37% 54% 46% / 55% 48% 52% 45%;
    top: 60%;
    right: -5%;
    animation: float2 20s infinite;
}

.shape-3 {
    width: 250px;
    height: 250px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 41% 59% 41% 59% / 41% 59% 41% 59%;
    bottom: 5%;
    left: 10%;
    animation: float3 30s infinite;
}

.shape-4 {
    width: 180px;
    height: 180px;
    background: linear-gradient(45deg, var(--accent-color), var(--primary-color));
    border-radius: 50%;
    top: 40%;
    left: 70%;
    animation: float4 22s infinite;
}

.shape-5 {
    width: 220px;
    height: 220px;
    background: linear-gradient(315deg, var(--secondary-color), var(--accent-color));
    border-radius: 70% 30% 30% 70% / 60% 40% 60% 40%;
    top: 20%;
    right: 15%;
    animation: float5 28s infinite;
}

.shape-6 {
    width: 160px;
    height: 160px;
    background: linear-gradient(180deg, var(--primary-color), var(--accent-color));
    border-radius: 38% 62% 63% 37% / 41% 44% 56% 59%;
    bottom: 30%;
    right: 30%;
    animation: float6 24s infinite;
}

@keyframes float1 {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg) scale(1);
    }
    33% {
        transform: translate(30px, -50px) rotate(120deg) scale(1.1);
    }
    66% {
        transform: translate(-20px, -30px) rotate(240deg) scale(0.9);
    }
}

@keyframes float2 {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg) scale(1);
    }
    50% {
        transform: translate(-40px, 40px) rotate(180deg) scale(1.15);
    }
}

@keyframes float3 {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg) scale(1);
    }
    25% {
        transform: translate(50px, 30px) rotate(90deg) scale(1.05);
    }
    75% {
        transform: translate(-30px, -20px) rotate(270deg) scale(0.95);
    }
}

@keyframes float4 {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    33% {
        transform: translate(-35px, 45px) rotate(120deg);
    }
    66% {
        transform: translate(25px, -35px) rotate(240deg);
    }
}

@keyframes float5 {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg) scale(1);
    }
    40% {
        transform: translate(-50px, -40px) rotate(144deg) scale(1.1);
    }
    80% {
        transform: translate(30px, 50px) rotate(288deg) scale(0.9);
    }
}

@keyframes float6 {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    50% {
        transform: translate(40px, -50px) rotate(180deg);
    }
}

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

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .hamburger {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 80px;
        right: -100%;
        width: 280px;
        height: calc(100vh - 80px);
        background: var(--nav-bg);
        flex-direction: column;
        padding: 2rem 1.5rem;
        gap: 1.5rem;
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.2);
        transition: right 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
        overflow-y: auto;
        z-index: 1001;
    }

    .nav-links.active {
        right: 0;
    }

    /* Mobile menu backdrop */
    .nav-links::before {
        content: '';
        position: fixed;
        top: 80px;
        right: 100%;
        width: 100vw;
        height: calc(100vh - 80px);
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(5px);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.4s ease, right 0s 0.4s;
        z-index: -1;
    }

    .nav-links.active::before {
        right: 280px;
        opacity: 1;
        pointer-events: all;
        transition: opacity 0.4s ease, right 0s;
    }

    .nav-links li {
        width: 100%;
        text-align: center;
        opacity: 0;
        transform: translateX(30px);
        animation: slideInMenuItem 0.4s ease forwards;
    }

    .nav-links.active li:nth-child(1) { animation-delay: 0.1s; }
    .nav-links.active li:nth-child(2) { animation-delay: 0.15s; }
    .nav-links.active li:nth-child(3) { animation-delay: 0.2s; }
    .nav-links.active li:nth-child(4) { animation-delay: 0.25s; }
    .nav-links.active li:nth-child(5) { animation-delay: 0.3s; }
    .nav-links.active li:nth-child(6) { animation-delay: 0.35s; }

    @keyframes slideInMenuItem {
        to {
            opacity: 1;
            transform: translateX(0);
        }
    }

    .nav-links a {
        display: block;
        padding: 1rem;
        border-radius: 12px;
    }

    .nav-links a::after {
        display: none;
    }

    .nav-links a:hover {
        background: var(--card-bg);
        transform: scale(1.05);
    }

    .lang-toggle,
    .theme-toggle {
        width: 100%;
        justify-content: center;
    }

    section h2 {
        font-size: 2rem;
    }

    .hero-animation {
        opacity: 0.5;
    }

    .desktop-animation {
        display: none;
    }

    .mobile-animation {
        display: block;
    }

    .logo {
        min-height: 50px;
        min-width: 150px;
    }

    .logo-img {
        height: 50px;
        max-width: 150px;
    }

    nav .container {
        padding: 0 1rem;
    }

    /* Reduce floating shape sizes on mobile */
    .shape-1 {
        width: 150px;
        height: 150px;
    }

    .shape-2 {
        width: 120px;
        height: 120px;
    }

    .shape-3 {
        width: 130px;
        height: 130px;
    }

    .shape-4 {
        width: 100px;
        height: 100px;
    }

    .shape-5 {
        width: 110px;
        height: 110px;
    }

    .shape-6 {
        width: 90px;
        height: 90px;
    }

    /* Reduce grid size on mobile */
    body::after {
        background-size: 30px 30px;
    }
}

