/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --black: #000;
    --dark: #0a0a0a;
    --dark-gray: #1a1a1a;
    --gray: #808080;
    --light-gray: #e0e0e0;
    --white: #fff;
    --accent: #4a90e2;
    --accent-light: #6ba3e8;
    --font-primary: 'Inter', sans-serif;
    --font-display: 'Space Grotesk', 'Inter', sans-serif;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    background: var(--black);
    color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

::selection {
    background: var(--white);
    color: var(--black);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 100;
    transition: all 0.3s;
}

.navbar.scrolled {
    padding: 1rem 0;
    background: rgba(0, 0, 0, 0.95);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo a {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    text-decoration: none;
    display: flex;
}

.logo-text {
    color: var(--white);
    transition: color 0.2s;
}

.logo-tld {
    color: var(--accent);
    transition: color 0.2s;
}

.nav-logo a:hover .logo-text {
    color: var(--accent);
}

.nav-logo a:hover .logo-tld {
    color: var(--white);
}

.nav-menu {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.nav-link {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
    transition: color 0.2s;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--white);
    transition: width 0.3s;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-toggle span {
    width: 28px;
    height: 2px;
    background: var(--white);
    transition: all 0.3s;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--black);
}

#spaceCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.8) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.hero-text-wrapper {
    animation: fadeInUp 1s ease-out;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 900;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.title-main {
    color: var(--white);
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
}

.title-tld {
    color: var(--accent);
    text-shadow: 0 0 30px rgba(74, 144, 226, 0.5);
}

.hero-logo {
    max-width: clamp(200px, 40vw, 400px);
    height: auto;
    display: block;
    margin: 0 auto;
    filter: drop-shadow(0 0 30px rgba(255, 255, 255, 0.2));
    animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.hero-rotating-text {
    min-height: 160px;
    margin-bottom: 2rem;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rotating-text {
    position: absolute;
    width: 100%;
    top: 50%;
    left: 0;
    transform: translateY(-50%) scale(0.9);
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 600;
    color: var(--white);
    opacity: 0;
    text-align: center;
    line-height: 1.4;
    padding: 0 1rem;
    transition: all 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.rotating-text.active {
    opacity: 1;
    transform: translateY(-50%) scale(1);
    transition: all 1s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.rotating-text.exit {
    opacity: 0;
    transform: translateY(-50%) scale(1.1);
    filter: blur(4px);
    transition: all 0.6s cubic-bezier(0.6, 0.04, 0.98, 0.335);
}

.scramble-char {
    color: var(--accent);
    opacity: 0.8;
    display: inline-block;
    animation: scrambleFlicker 0.1s infinite;
}

@keyframes scrambleFlicker {

    0%,
    100% {
        opacity: 0.8;
    }

    50% {
        opacity: 0.4;
    }
}

.hero-description {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--light-gray);
    max-width: 700px;
    margin: 0 auto 3rem;
    line-height: 1.8;
}

.hero-cta {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    border: none;
    border-radius: 12px;
    font-family: var(--font-primary);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn span,
.btn i {
    position: relative;
    z-index: 1;
}

.btn-primary {
    background: var(--white);
    color: var(--black);
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(255, 255, 255, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-secondary:hover {
    background: var(--white);
    color: var(--black);
    transform: translateY(-2px);
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    animation: bounce 2s infinite;
}

.mouse {
    width: 26px;
    height: 40px;
    border: 2px solid var(--white);
    border-radius: 20px;
    position: relative;
}

.wheel {
    width: 4px;
    height: 8px;
    background: var(--white);
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 1.5s infinite;
}

/* Sections */
section {
    padding: 6rem 0;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--white);
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    border-radius: 2px;
}

.section-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--gray);
    max-width: 600px;
    margin: 0 auto;
}

/* Services */
.services {
    background: var(--dark);
    position: relative;
}

.services::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.service-card {
    background: var(--dark-gray);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2.5rem;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.1) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s;
}

.service-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent);
    box-shadow: 0 12px 40px rgba(74, 144, 226, 0.2);
}

.service-card:hover::before {
    opacity: 1;
}

.service-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 2rem;
    color: var(--white);
    transition: all 0.3s;
}

.service-card:hover .service-icon {
    transform: rotateY(360deg);
}

.service-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--white);
}

.service-description {
    color: var(--light-gray);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.service-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.feature-tag {
    padding: 0.4rem 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--white);
    transition: all 0.2s;
}

.service-card:hover .feature-tag {
    background: rgba(74, 144, 226, 0.1);
    border-color: var(--accent);
}

/* Team */
.team {
    background: var(--black);
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
    margin-top: 4rem;
}

.team-member {
    text-align: center;
    transition: transform 0.3s;
}

.team-member:hover {
    transform: translateY(-10px);
}

.member-image {
    position: relative;
    width: 220px;
    height: 220px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid transparent;
    background: linear-gradient(var(--dark-gray), var(--dark-gray)) padding-box, linear-gradient(135deg, var(--accent), var(--accent-light)) border-box;
    transition: all 0.3s;
}

.team-member:hover .member-image {
    box-shadow: 0 0 40px rgba(74, 144, 226, 0.4);
}

.image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--dark), var(--dark-gray));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    color: var(--gray);
}

.member-social {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    padding: 1.5rem 0.5rem 0.5rem;
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s;
}

.team-member:hover .member-social {
    opacity: 1;
    transform: translateY(0);
}

.social-link {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.social-link:hover {
    background: var(--accent);
    border-color: var(--accent);
    transform: translateY(-3px);
}

.member-name {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--white);
}

.member-role {
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
}

.member-bio {
    color: var(--gray);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Projects */
.projects {
    background: var(--dark);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 2.5rem;
    margin-top: 4rem;
}

.project-card {
    background: var(--dark-gray);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s;
}

.project-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent);
    box-shadow: 0 12px 40px rgba(74, 144, 226, 0.2);
}

.project-image {
    position: relative;
    height: 250px;
    background: linear-gradient(135deg, var(--dark), var(--dark-gray));
    overflow: hidden;
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.9), rgba(107, 163, 232, 0.9));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-link {
    width: 60px;
    height: 60px;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 1.5rem;
    text-decoration: none;
    transform: scale(0);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.project-card:hover .project-link {
    transform: scale(1);
}

.project-content {
    padding: 2rem;
}

.project-category {
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.8rem;
}

.project-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--white);
}

.project-description {
    color: var(--light-gray);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-tag {
    padding: 0.4rem 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--white);
}

/* Contact */
.contact {
    background: var(--black);
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 4rem;
    margin-top: 4rem;
}

.contact-info-title {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--white);
}

.contact-info-text {
    color: var(--light-gray);
    margin-bottom: 2.5rem;
    line-height: 1.8;
}

.contact-details {
    margin-bottom: 3rem;
}

.contact-item {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.contact-item-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--white);
    flex-shrink: 0;
}

.contact-item-content h4 {
    color: var(--white);
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.contact-item-content a,
.contact-item-content p {
    color: var(--gray);
    text-decoration: none;
    transition: color 0.2s;
}

.contact-item-content a:hover {
    color: var(--accent);
}

.contact-social h4 {
    color: var(--white);
    font-weight: 600;
    margin-bottom: 1rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.contact-form-wrapper {
    background: var(--dark-gray);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2.5rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    position: relative;
}

.form-input {
    width: 100%;
    padding: 1rem 1rem 1rem 0;
    background: transparent;
    border: none;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    color: var(--white);
    font-family: var(--font-primary);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

.form-input:focus,
.form-input:not(:placeholder-shown) {
    border-bottom-color: var(--accent);
}

.form-label {
    position: absolute;
    left: 0;
    top: 1rem;
    color: var(--gray);
    font-size: 1rem;
    pointer-events: none;
    transition: all 0.3s;
}

.form-input:focus+.form-label,
.form-input:not(:placeholder-shown)+.form-label {
    top: -1.2rem;
    font-size: 0.85rem;
    color: var(--accent);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

/* Footer */
.footer {
    background: var(--dark);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 3rem 0 2rem;
    text-align: center;
}

.footer-logo {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-text {
    color: var(--gray);
    margin-bottom: 1.5rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.footer-copyright {
    color: var(--gray);
    font-size: 0.9rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    40% {
        transform: translateX(-50%) translateY(-10px);
    }

    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

@keyframes scroll {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }

    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .projects-grid,
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: rgba(0, 0, 0, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 6rem 2rem 2rem;
        gap: 2rem;
        transition: right 0.3s;
        border-left: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(8px, -8px);
    }

    .hero-cta {
        flex-direction: column;
        align-items: stretch;
    }

    .services-grid,
    .team-grid,
    .projects-grid {
        grid-template-columns: 1fr;
    }

    section {
        padding: 4rem 0;
    }
}

@media (max-width: 480px) {

    .container,
    .nav-container {
        padding: 0 1.5rem;
    }

    .hero-content {
        padding: 1.5rem;
    }

    .service-card,
    .contact-form-wrapper {
        padding: 1.5rem;
    }

    .hero-rotating-text {
        min-height: 180px;
    }
}