:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #a78bfa;
    --bg-dark: #0a0a0a;
    --bg-card: rgba(17, 17, 27, 0.7);
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --border: rgba(255, 255, 255, 0.1);
    --glow: rgba(99, 102, 241, 0.5);
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Courier New', monospace;
}

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

body {
    font-family: var(--font-main);
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

.aurora-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at top left, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at bottom right, rgba(167, 139, 250, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at center, rgba(139, 92, 246, 0.1) 0%, transparent 70%);
    z-index: -1;
    animation: aurora 20s ease-in-out infinite;
}

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

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

header {
    position: fixed;
    top: 0;
    width: 100%;
    backdrop-filter: blur(10px);
    background: rgba(10, 10, 10, 0.8);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2.5rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.logo-icon {
    font-size: 2rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.lang-switch {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 0.75rem 2rem;
    border-radius: 0.75rem;
    cursor: pointer;
    font-family: var(--font-main);
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.lang-switch:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(99, 102, 241, 0.3);
}

.hidden {
    display: none;
}

main {
    margin-top: 120px;
}

.hero {
    padding: 6rem 0 4rem;
    text-align: center;
    position: relative;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glitch {
    position: relative;
    display: inline-block;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glitch::before {
    animation: glitch-1 0.5s infinite;
    clip: rect(44px, 450px, 56px, 0);
}

.glitch::after {
    animation: glitch-2 0.5s infinite;
    clip: rect(44px, 450px, 56px, 0);
}

@keyframes glitch-1 {
    0% { clip: rect(132px, 999px, 101px, 30px); }
    20% { clip: rect(85px, 999px, 145px, 30px); }
    40% { clip: rect(32px, 999px, 76px, 30px); }
    60% { clip: rect(103px, 999px, 88px, 30px); }
    80% { clip: rect(22px, 999px, 134px, 30px); }
    100% { clip: rect(147px, 999px, 110px, 30px); }
}

@keyframes glitch-2 {
    0% { clip: rect(44px, 999px, 136px, 0); transform: translate(-2px, 0); }
    20% { clip: rect(112px, 999px, 28px, 0); transform: translate(2px, 0); }
    40% { clip: rect(88px, 999px, 142px, 0); transform: translate(-2px, 0); }
    60% { clip: rect(14px, 999px, 74px, 0); transform: translate(2px, 0); }
    80% { clip: rect(124px, 999px, 52px, 0); transform: translate(-2px, 0); }
    100% { clip: rect(94px, 999px, 116px, 0); transform: translate(2px, 0); }
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

.hero-code {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--primary);
    padding: 1.25rem 1.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    display: inline-block;
    backdrop-filter: blur(10px);
}

.cursor {
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.projects {
    padding: 4rem 0;
}

h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.project-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 2rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    overflow: hidden;
    min-height: 280px;
    display: flex;
    flex-direction: column;
}

.card-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, var(--glow) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.project-card:hover .card-glow {
    opacity: 0.3;
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 40px rgba(99, 102, 241, 0.2);
}

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

.project-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.project-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.project-card p {
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    line-height: 1.6;
    flex-grow: 1;
    font-size: 0.95rem;
}

.project-tags {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.tag {
    background: rgba(99, 102, 241, 0.2);
    color: var(--primary);
    padding: 0.375rem 1rem;
    border-radius: 999px;
    font-size: 0.875rem;
    font-family: var(--font-mono);
}

.coming-soon {
    opacity: 0.6;
    cursor: not-allowed;
}

.coming-soon:hover {
    transform: none;
    border-color: var(--border);
    box-shadow: none;
}

.features {
    padding: 4rem 0;
    background: rgba(17, 17, 27, 0.5);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
}

.feature-card {
    text-align: center;
    padding: 2rem 1.5rem;
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: inline-block;
    animation: float 3s ease-in-out infinite;
}

.feature-card:nth-child(2) .feature-icon {
    animation-delay: 0.5s;
}

.feature-card:nth-child(3) .feature-icon {
    animation-delay: 1s;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.95rem;
}

.newsletter {
    padding: 4rem 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(167, 139, 250, 0.05) 100%);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

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

.newsletter-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.newsletter-form {
    display: flex;
    gap: 1rem;
    max-width: 450px;
    margin: 0 auto 2rem;
}

.email-input {
    flex: 1;
    padding: 1rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: var(--font-main);
}

.email-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.email-input::placeholder {
    color: var(--text-secondary);
}

.submit-btn {
    padding: 1rem 2rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-family: var(--font-main);
}

.submit-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
}

.newsletter-note {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
}

footer {
    padding: 3rem 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: var(--primary);
}

@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }
    
    nav {
        padding: 2rem 0;
    }
    
    .hero {
        padding: 4rem 0 3rem;
    }
    
    main {
        margin-top: 90px;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .features-grid {
        gap: 2rem;
    }
    
    .project-card {
        padding: 2rem;
        min-height: auto;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    h1 {
        font-size: 2.5rem;
        margin-bottom: 1.5rem;
    }
    
    h2 {
        font-size: 2rem;
        margin-bottom: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
        margin-bottom: 2.5rem;
    }
    
    .sections {
        padding: 4rem 0;
    }
    
    .newsletter {
        padding: 4rem 0;
    }
    
    .newsletter-form {
        flex-direction: column;
        gap: 1rem;
    }
    
    .submit-btn {
        width: 100%;
    }
    
    .logo {
        font-size: 1.25rem;
    }
    
    .logo-icon {
        font-size: 1.5rem;
    }
    
    .lang-switch {
        padding: 0.6rem 1.5rem;
        font-size: 0.875rem;
    }
}

::selection {
    background: var(--primary);
    color: white;
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}