@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Outfit:wght@400;600;700;800&display=swap');

:root {
    /* Cosmic Dark Theme Palette */
    --primary-color: #3b82f6;
    /* Neon Blue */
    --primary-dark: #2563eb;
    --accent-color: #8b5cf6;
    /* Neon Purple */
    --accent-glow: rgba(139, 92, 246, 0.4);
    --primary-glow: rgba(59, 130, 246, 0.4);

    --text-color: #f8fafc;
    --text-light: #94a3b8;

    --bg-color: #0b0f19;
    /* Deep cosmic black/blue */
    --bg-gray: rgba(30, 41, 59, 0.5);
    /* Glassy gray */
    --glass-bg: rgba(15, 23, 42, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);

    --font-heading: 'Outfit', sans-serif;
    --font-main: 'Inter', -apple-system, sans-serif;

    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;

    --container-width: 1100px;
    --border-radius: 16px;
    --transition-speed: 0.4s;

    /* Cosmic Shadows */
    --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --shadow-glow: 0 0 20px var(--primary-glow);
}

/* Reset & Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    position: relative;
    overflow-x: hidden;
}

/* Cosmic Animated Background */
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 15% 50%, rgba(59, 130, 246, 0.08), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.08), transparent 25%);
    z-index: -1;
    pointer-events: none;
    animation: galaxy 20s ease-in-out infinite alternate;
}

@keyframes galaxy {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.1);
    }
}

h1,
h2,
h3,
h4,
h5,
h6,
.logo {
    font-family: var(--font-heading);
}

img {
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all var(--transition-speed);
}

ul {
    list-style: none;
}

button,
input,
textarea {
    font-family: inherit;
}

/* Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
    position: relative;
    z-index: 1;
}

.section {
    padding: var(--spacing-lg) 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: var(--spacing-md);
    text-align: center;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.section-title--left {
    text-align: left;
}

/* Glassmorphism Card Utility */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-glass);
}

.btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    /* Pill shape for modern look */
    font-weight: 600;
    font-family: var(--font-heading);
    cursor: pointer;
    border: none;
    transition: all var(--transition-speed);
    text-align: center;
    letter-spacing: 0.5px;
}

.btn--primary {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn--primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px var(--accent-glow);
}

.btn--secondary {
    background-color: transparent;
    border: 2px solid var(--glass-border);
    color: var(--text-color);
    backdrop-filter: blur(5px);
}

.btn--secondary:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 15px var(--primary-glow) inset;
    background: rgba(59, 130, 246, 0.1);
}

.btn--outline {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--text-color);
    box-shadow: 0 0 10px var(--primary-glow);
}

.btn--outline:hover {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 0 20px var(--primary-glow);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Header */
.header {
    background: rgba(11, 15, 25, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    border-bottom: 1px solid var(--glass-border);
    transition: padding 0.3s;
}

.header__container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    font-weight: 800;
    font-size: 1.5rem;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.nav__list {
    display: flex;
    gap: var(--spacing-md);
}

.nav__link {
    font-weight: 500;
    color: var(--text-light);
    position: relative;
}

.nav__link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width var(--transition-speed);
    box-shadow: 0 0 8px var(--primary-glow);
}

.nav__link:hover {
    color: #fff;
}

.nav__link:hover::after {
    width: 100%;
}

.lang-switch {
    display: flex;
    gap: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-light);
    background: var(--glass-bg);
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
}

.lang-switch__item.active {
    color: #fff;
    text-shadow: 0 0 8px #fff;
}

.lang-switch__item {
    cursor: pointer;
    transition: color 0.2s;
}

.lang-switch__item:hover {
    color: #fff;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
    z-index: 1001;
    /* Above mobile menu */
}

.mobile-menu-btn span {
    width: 30px;
    height: 2px;
    background-color: #fff;
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

/* Mobile Menu Overlay */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(11, 15, 25, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    justify-content: center;
    align-items: center;
    transform: translateY(-100%);
    transition: transform 0.4s cubic-bezier(0.77, 0, 0.175, 1);
    z-index: 999;
}

.mobile-menu.active {
    transform: translateY(0);
}

.mobile-menu__list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    text-align: center;
}

.mobile-menu__link {
    font-size: 2rem;
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-light);
}

.mobile-menu__link:hover {
    color: #fff;
    text-shadow: 0 0 15px var(--primary-glow);
}

/* Hero */
.hero {
    padding-top: 160px;
    padding-bottom: var(--spacing-lg);
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero__container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    align-items: center;
}

.hero__title {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: var(--spacing-sm);
    color: #fff;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.hero__subtitle {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: var(--spacing-md);
    font-weight: 600;
    font-family: var(--font-heading);
    text-shadow: 0 0 10px var(--primary-glow);
}

.hero__text {
    font-size: 1.125rem;
    color: var(--text-light);
    margin-bottom: var(--spacing-md);
    max-width: 500px;
    line-height: 1.8;
}

.hero__actions {
    display: flex;
    gap: var(--spacing-sm);
}

.hero__image {
    position: relative;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    /* Blob shape */
    overflow: hidden;
    box-shadow: var(--shadow-glow);
    aspect-ratio: 1;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    padding: 4px;
    /* Gradient border effect */
    animation: morph 8s ease-in-out infinite alternate;
}

@keyframes morph {
    0% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    }

    50% {
        border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%;
    }

    100% {
        border-radius: 50% 50% 50% 50% / 50% 50% 50% 50%;
    }
}

.hero__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}

/* Tech Stack Marquee */
.tech-stack {
    padding: var(--spacing-sm) 0;
    overflow: hidden;
    background: linear-gradient(90deg, transparent, rgba(30, 41, 59, 0.4), transparent);
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
    margin: var(--spacing-md) 0;
}

.tech-marquee {
    display: flex;
    gap: 3rem;
    width: max-content;
    animation: scrollText 20s linear infinite;
}

.tech-item {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tech-item span {
    color: var(--primary-color);
}

@keyframes scrollText {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* About */
.about__content {
    padding: var(--spacing-md);
    max-width: 900px;
    margin: 0 auto;
}

.about__text {
    margin-bottom: var(--spacing-md);
    font-size: 1.2rem;
    color: #fff;
    line-height: 1.8;
    text-align: center;
}

.about__skills {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
}

.about__skills li {
    background: rgba(255, 255, 255, 0.03);
    padding: var(--spacing-sm);
    border-radius: var(--border-radius);
    border: 1px solid var(--glass-border);
    transition: transform 0.3s, background 0.3s;
}

.about__skills li:hover {
    transform: translateY(-2px);
    background: rgba(59, 130, 246, 0.08);
    border-color: rgba(59, 130, 246, 0.3);
}

.about__skills strong {
    color: var(--primary-color);
    font-family: var(--font-heading);
}

/* Services */
.services {
    position: relative;
}

.services::before {
    content: '';
    position: absolute;
    top: 20%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: var(--accent-glow);
    filter: blur(150px);
    z-index: 0;
    border-radius: 50%;
}

.services__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--spacing-md);
    position: relative;
    z-index: 1;
}

.service-card {
    padding: var(--spacing-md);
    text-align: left;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4), 0 0 20px var(--primary-glow);
    border-color: rgba(59, 130, 246, 0.4);
    background: rgba(15, 23, 42, 0.8);
}

.service-card__icon {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-sm);
    display: inline-block;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.02);
}

.service-card__title {
    margin-bottom: var(--spacing-xs);
    font-size: 1.35rem;
    color: #fff;
}

.service-card__desc {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Portfolio */
.portfolio__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.portfolio-card {
    overflow: hidden;
    transition: all var(--transition-speed);
    display: flex;
    flex-direction: column;
}

.portfolio-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 15px var(--accent-glow);
    border-color: rgba(139, 92, 246, 0.4);
}

.portfolio-card__image {
    height: 220px;
    background-color: #1e293b;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.portfolio-card__image::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: skewX(-20deg);
    transition: 0.5s;
}

.portfolio-card:hover .portfolio-card__image::before {
    left: 150%;
}

.portfolio-card__icon {
    font-size: 4rem;
    opacity: 0.8;
}

.portfolio-card__content {
    padding: var(--spacing-sm);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.portfolio-card__title {
    font-size: 1.3rem;
    color: #fff;
    margin-bottom: 0.5rem;
}

.portfolio-card__desc {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.portfolio__actions {
    text-align: center;
    margin-top: var(--spacing-lg);
}

/* Process */
.process__steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--spacing-md);
    position: relative;
}

/* Connecting line */
@media(min-width: 768px) {
    .process__steps::before {
        content: '';
        position: absolute;
        top: 40px;
        left: 10%;
        width: 80%;
        height: 2px;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
        z-index: 0;
    }
}

.process__step {
    text-align: center;
    padding: var(--spacing-sm);
    position: relative;
    z-index: 1;
}

.process__number {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border: 2px solid var(--primary-color);
    box-shadow: 0 0 15px var(--primary-glow), inset 0 0 10px rgba(0, 0, 0, 0.5);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-family: var(--font-heading);
    font-weight: 800;
    margin: 0 auto var(--spacing-sm);
    transition: transform 0.3s;
}

.process__step:hover .process__number {
    transform: scale(1.1) rotate(5deg);
    background: var(--primary-color);
}

.process__step h3 {
    margin-bottom: 0.5rem;
    color: #fff;
}

.process__step p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* FAQ */
.faq__list {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.faq__item {
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq__item.active {
    border-color: var(--primary-color);
    box-shadow: 0 0 15px var(--primary-glow);
}

.faq__question {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 1.5rem;
    font-size: 1.2rem;
    font-weight: 600;
    color: #fff;
    font-family: var(--font-heading);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.2s;
}

.faq__question:hover {
    color: var(--primary-color);
}

.faq__item.active .faq__icon {
    transform: rotate(45deg);
    color: var(--primary-color);
    text-shadow: 0 0 10px var(--primary-glow);
}

.faq__icon {
    font-size: 1.8rem;
    font-weight: 300;
    transition: transform 0.3s, color 0.3s;
}

.faq__answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out;
}

.faq__item.active .faq__answer {
    max-height: 300px;
}

.faq__answer p {
    padding: 0 1.5rem 1.5rem 1.5rem;
    color: var(--text-light);
    line-height: 1.7;
}

/* Contacts */
.contacts__container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
}

.contacts__info p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.contacts__list {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.contacts__list li {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.1rem;
}

.contacts__list li a {
    color: #fff;
    transition: color 0.2s;
}

.contacts__list li a:hover {
    color: var(--primary-color);
    text-shadow: 0 0 8px var(--primary-glow);
}

.contacts__icon {
    font-size: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--glass-border);
}

.contact-form {
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem 1.2rem;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    font-size: 1rem;
    color: #fff;
    transition: all 0.3s;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #64748b;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
    background: rgba(15, 23, 42, 0.8);
}

.form-message {
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    padding: 10px;
    border-radius: 8px;
    opacity: 0;
    transition: opacity 0.3s;
}

.form-message.show {
    opacity: 1;
}

.form-message.success {
    background: rgba(34, 197, 94, 0.1);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

/* Floating Action Button (FAB) */
.fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 5px 20px var(--primary-glow);
    z-index: 99;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0;
    transform: scale(0) translateY(20px);
    pointer-events: none;
}

.fab.visible {
    opacity: 1;
    transform: scale(1) translateY(0);
    pointer-events: auto;
}

.fab:hover {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 8px 25px var(--accent-glow);
}

/* Footer */
.footer {
    padding: var(--spacing-md) 0;
    border-top: 1px solid var(--glass-border);
    background: rgba(11, 15, 25, 0.8);
    backdrop-filter: blur(10px);
    font-size: 0.95rem;
    color: var(--text-light);
}

.footer__container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    align-items: center;
}

.footer__links {
    display: flex;
    gap: var(--spacing-md);
}

.footer__links a {
    transition: color 0.2s;
}

.footer__links a:hover {
    color: #fff;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    :root {
        --spacing-lg: 3rem;
        --spacing-md: 1.5rem;
    }

    .hero {
        padding-top: 120px;
        text-align: center;
    }

    .hero__container {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .hero__title {
        font-size: 3rem;
    }

    .hero__actions {
        justify-content: center;
    }

    .hero__image {
        order: -1;
        max-width: 250px;
        margin: 0 auto;
    }

    .nav__list,
    .lang-switch {
        display: none;
        /* Move to mobile menu */
    }

    .mobile-menu-btn {
        display: flex;
    }

    .mobile-menu .lang-switch {
        display: flex;
        margin-top: 2rem;
        background: rgba(255, 255, 255, 0.05);
    }

    .about__skills {
        grid-template-columns: 1fr;
    }

    .contacts__container {
        grid-template-columns: 1fr;
    }

    .footer__container {
        flex-direction: column;
        justify-content: center;
        text-align: center;
    }

    .tech-marquee {
        gap: 2rem;
    }

    .tech-item {
        font-size: 1rem;
    }
}