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

*:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: 4px;
}

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

.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.9);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logo:hover {
    transform: translateX(5px);
}

.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: color 0.3s ease;
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

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

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

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

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

.nav-link:focus {
    outline: 2px solid var(--primary);
    outline-offset: 4px;
    border-radius: 4px;
}

.nav-right {
    display: flex;
    gap: 1.25rem;
    align-items: center;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    position: relative;
}

.mobile-menu-toggle:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: 4px;
}

.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s ease;
    display: block;
}

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

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

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

.logo-icon {
    font-size: 1.75rem;
    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.875rem 2rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-family: var(--font-main);
    font-size: 0.9375rem;
    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);
}

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

.hidden {
    display: none;
}

main {
    margin-top: 140px;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 140px;
}

.hero {
    padding: 4rem 0 3rem;
    text-align: center;
    position: relative;
    min-height: 50vh;
    display: flex;
    align-items: center;
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.3;
    letter-spacing: -0.02em;
    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: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    line-height: 1.7;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.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: clamp(1.75rem, 4vw, 2.25rem);
    text-align: center;
    margin-bottom: 3rem;
    letter-spacing: -0.01em;
    font-weight: 600;
    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(320px, 1fr));
    gap: 1.5rem;
    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 cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    overflow: hidden;
    min-height: 260px;
    display: flex;
    flex-direction: column;
    -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) {
    .project-card:hover {
        transform: translateY(-8px) scale(1.02);
        border-color: var(--primary);
        box-shadow: 0 20px 40px rgba(99, 102, 241, 0.3);
    }
    
    .project-card:hover .project-icon {
        transform: scale(1.1) rotate(5deg);
    }
    
    .project-card:hover .tag {
        background: rgba(99, 102, 241, 0.3);
    }
    
    .project-card:hover .card-glow {
        opacity: 0.3;
    }
}

@media (hover: none) {
    .project-card:active {
        transform: scale(0.98);
        border-color: var(--primary);
    }
}

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



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

.project-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    display: inline-block;
    transition: transform 0.3s ease;
}


.project-card h3 {
    font-size: 1.375rem;
    margin-bottom: 1rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

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

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

.tag {
    background: rgba(99, 102, 241, 0.2);
    color: var(--primary);
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-family: var(--font-mono);
    transition: all 0.3s ease;
}


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

.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: 1rem;
    font-weight: 600;
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 0.9375rem;
    max-width: 320px;
    margin: 0 auto;
}

.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: clamp(1rem, 2vw, 1.125rem);
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

.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);
    background: rgba(17, 17, 27, 0.9);
}

.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 cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    font-family: var(--font-main);
    position: relative;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.submit-btn:active::before {
    width: 300px;
    height: 300px;
}

@media (hover: none) {
    .submit-btn:active {
        transform: scale(0.95);
    }
}

.submit-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(99, 102, 241, 0.35);
}

.submit-btn:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

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

footer {
    padding: 3rem 0;
}

.footer-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

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

.footer-made {
    font-size: 0.875rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.heart {
    display: inline-block;
    animation: heartbeat 1.5s ease-in-out infinite;
    color: #ef4444;
    font-size: 1.1rem;
    font-weight: 400;
}

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


@media (max-width: 768px) {
    .project-card {
        padding: 1.5rem;
        min-height: auto;
    }


    .nav-menu {
        display: none;
        position: fixed;
        top: 100px;
        left: 0;
        right: 0;
        background: rgba(10, 10, 10, 0.98);
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        transform: translateX(0);
        border-bottom: 1px solid var(--border);
        backdrop-filter: blur(20px);
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav-link {
        font-size: 1.125rem;
        width: 100%;
        text-align: center;
        padding: 1rem;
    }


    .container {
        padding: 0 20px;
    }
    
    nav {
        padding: 0;
    }
    
    .hero {
        padding: 3rem 0 2rem;
        min-height: 40vh;
    }
    
    main {
        margin-top: 100px;
    }
    
    html {
        scroll-padding-top: 100px;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .features-grid {
        gap: 2rem;
    }
    
    .project-card {
        padding: 1.5rem;
        min-height: auto;
    }
    
    
    
    h1 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    h2 {
        font-size: 1.75rem;
        margin-bottom: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .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;
    }
    
    .project-icon {
        font-size: 2.5rem;
    }
    
    .feature-icon {
        font-size: 2.5rem;
    }
    
    .project-tags {
        gap: 0.5rem;
    }
    
    .tag {
        font-size: 0.7rem;
        padding: 0.2rem 0.6rem;
    }
    
    .lang-switch {
        padding: 0.6rem 1.25rem;
        font-size: 0.8125rem;
    }
}

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

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

::-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);
}