:root {
    --primary-color: #a29bfe;
    --secondary-color: #6c5ce7;
    --text-color: #f1f1f1;
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --border-color: #333333;
    --accent-color: #fd79a8;
    --success-color: #00b894;
    --terminal-bg: #2d3436;
    --terminal-text: #ecf0f1;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    --transition: all 0.3s ease;
}

/* Add light theme variables */
body.light-theme {
    --text-color: #333333;
    --bg-color: #ffffff;
    --card-bg: #f5f5f5;
    --border-color: #e0e0e0;
    --terminal-bg: #f0f0f0;
    --terminal-text: #333333;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
    transition: var(--transition);
    overflow-x: hidden;
}

/* Удаляем стили курсора */
.cursor {
    display: none;
}

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

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 2rem;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
    background-color: rgba(18, 18, 18, 0.6);
    backdrop-filter: blur(15px) saturate(180%);
    -webkit-backdrop-filter: blur(15px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Добавляем эффект при прокрутке */
header.scrolled {
    padding: 1rem 2rem;
    background-color: rgba(18, 18, 18, 0.75);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(120deg, #6c5ce7, #a29bfe, #fd79a8);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient 3s ease infinite;
    letter-spacing: -0.5px;
    transition: all 0.3s ease;
}

.logo:hover {
    transform: translateY(-1px);
    filter: brightness(1.2);
}

@keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.social-icons {
    display: flex;
    gap: 1.2rem;
    position: relative;
    padding-right: 2.5rem;
}

/* Add separator between social icons and theme toggle */
.social-icons::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 24px;
    width: 1px;
    background-color: var(--border-color);
}

.nav-icon {
    color: var(--text-color);
    font-size: 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.9;
    position: relative;
    backdrop-filter: blur(5px);
    padding: 8px;
    border-radius: 50%;
}

.nav-icon:hover {
    color: var(--primary-color);
    opacity: 1;
    transform: translateY(-2px);
    background: rgba(162, 155, 254, 0.1);
    box-shadow: 0 0 20px rgba(162, 155, 254, 0.2);
}

/* Add tooltip on hover */
.nav-icon {
    position: relative;
}

.nav-icon::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background-color: var(--card-bg);
    color: var(--text-color);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.nav-icon:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.theme-toggle {
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: transparent;
    box-shadow: none;
    transition: var(--transition);
    color: var(--text-color);
    opacity: 0.8;
}

.theme-toggle:hover {
    transform: translateY(-2px);
    opacity: 1;
    color: var(--primary-color);
}

.theme-toggle .fa-moon {
    display: block;
}

.theme-toggle .fa-sun {
    display: none;
}

body.light-theme .theme-toggle .fa-moon {
    display: none;
}

body.light-theme .theme-toggle .fa-sun {
    display: block;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, var(--secondary-color, #a29bfe) 0%, transparent 70%);
    opacity: 0.1;
    z-index: -1;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
    letter-spacing: -1px;
    position: relative;
}

/* Add new styles for username highlight */
.hero h1 span.username {
    background: linear-gradient(120deg, var(--primary-color), var(--accent-color));
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientFlow 3s ease infinite;
    position: relative;
    display: inline-block;
}

@keyframes gradientFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero h1 span.username::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    opacity: 0.3;
    border-radius: 2px;
}

.glitch {
    position: relative;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.8;
}

.glitch::before {
    color: var(--accent-color);
    z-index: -1;
    animation: glitch-effect 3s infinite alternate-reverse;
}

.glitch::after {
    color: var(--primary-color);
    z-index: -2;
    animation: glitch-effect 2s infinite alternate-reverse;
}

@keyframes glitch-effect {
    0% {
        transform: none;
        opacity: 0.8;
    }
    20% {
        transform: translate(-2px, 1px);
        opacity: 0.8;
    }
    40% {
        transform: translate(-2px, -1px);
        opacity: 0.8;
    }
    60% {
        transform: translate(1px, 1px);
        opacity: 0.8;
    }
    80% {
        transform: translate(1px, -1px);
        opacity: 0.8;
    }
    100% {
        transform: none;
        opacity: 0.8;
    }
}

.typing-container {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
}

.dynamic-text {
    color: var(--primary-color);
    margin-left: 0.5rem;
}

.cursor-typing {
    display: inline-block;
    width: 3px;
    height: 1.5rem;
    background-color: var(--primary-color);
    margin-left: 0.5rem;
    animation: blink 0.7s infinite;
}

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

.bio {
    font-size: 1.2rem;
    max-width: 600px;
    margin-bottom: 2.5rem;
    color: var(--text-color);
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
}

.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn.primary {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.4);
}

.btn.secondary {
    background-color: transparent;
    color: var(--text-color);
    border: 2px solid var(--border-color);
}

.btn:hover {
    transform: translateY(-3px);
}

.btn.primary:hover {
    box-shadow: 0 7px 20px rgba(108, 92, 231, 0.6);
}

.btn.secondary:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Skills Section */
.skills {
    padding: 6rem 0;
    background-color: var(--bg-color);
}

.skills h2, .about h2, .projects h2, .contact h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.skills h2::after, .about h2::after, .projects h2::after, .contact h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60%;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

.skill-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.skill-card {
    background-color: var(--card-bg);
    border-radius: 10px;
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-align: center;
}

.skill-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.skill-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.skill-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.skill-card p {
    color: var(--text-color);
    opacity: 0.8;
}

/* About Section */
.about {
    padding: 6rem 0;
    background-color: var(--bg-color);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.terminal {
    background-color: var(--terminal-bg);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    max-width: 100%;
}

.terminal-header {
    background-color: #1a1a1a;
    padding: 0.8rem;
    display: flex;
    align-items: center;
}

.terminal-buttons {
    display: flex;
    gap: 0.5rem;
    margin-right: 1rem;
}

.terminal-button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.terminal-button.red {
    background-color: #ff5f56;
}

.terminal-button.yellow {
    background-color: #ffbd2e;
}

.terminal-button.green {
    background-color: #27c93f;
}

.terminal-title {
    color: #ddd;
    font-size: 0.9rem;
    font-family: monospace;
}

.terminal-body {
    padding: 1.5rem;
    font-family: monospace;
    color: var(--terminal-text);
    font-size: 1rem;
    line-height: 1.8;
}

.line {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
}

.line.command {
    color: #fff;
    font-weight: 700;
}

.line.command::before {
    content: '$ ';
    color: var(--primary-color);
    font-weight: 700;
}

.line.output {
    color: #a0a0a0;
    font-weight: 300;
    padding-left: 1rem;
}

.terminal-cursor {
    width: 8px;
    height: 15px;
    background-color: var(--terminal-text);
    display: inline-block;
    margin-left: 4px;
    animation: blink 1s step-end infinite;
}

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

/* Projects Section */
.projects {
    padding: 6rem 0;
    background-color: var(--bg-color);
}

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

.project-card {
    background-color: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.project-image {
    height: 200px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.project-content {
    padding: 1.5rem;
}

.project-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.project-content p {
    margin-bottom: 1.5rem;
    color: var(--text-color);
    opacity: 0.8;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.project-tags span {
    background-color: var(--secondary-color);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.project-link {
    display: inline-flex;
    align-items: center;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.project-link i {
    margin-left: 0.5rem;
    font-size: 0.9rem;
}

.project-link:hover {
    color: var(--secondary-color);
    transform: translateX(5px);
}

/* Contact Section */
.contact {
    padding: 6rem 0;
    background-color: var(--bg-color);
}

.contact-intro {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3rem;
    font-size: 1.2rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 4rem;
    flex-wrap: wrap;
}

.social-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-color);
    transition: var(--transition);
}

.social-link i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.social-link:hover {
    transform: translateY(-5px);
    color: var(--primary-color);
}

/* Footer */
footer {
    background-color: var(--card-bg);
    padding: 4rem 0 2rem;
    margin-top: 2rem;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 3rem;
}

.footer-logo {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.footer-tagline {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    max-width: 500px;
}

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

.footer-links a {
    text-decoration: none;
    color: var(--text-color);
    transition: var(--transition);
}

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

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
    flex-wrap: wrap;
    gap: 1rem;
}


/* Responsive Design */
@media (max-width: 992px) {
    .hero h1 {
        font-size: 3rem;
    }
    
    .typing-container {
        font-size: 1.5rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .terminal {
        margin-top: 2rem;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .typing-container {
        font-size: 1.2rem;
    }
    
    .bio {
        font-size: 1rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        gap: 1rem;
    }
    
    .btn {
        width: 100%;
        text-align: center;
    }
    
    .social-links {
        gap: 1rem;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .cursor {
        display: none;
    }
    
    .header-nav {
        gap: 1rem;
    }
    
    .social-icons {
        padding-right: 1.5rem;
    }
    
    .nav-icon {
        font-size: 1.3rem;
    }
    
    .nav-icon::before {
        display: none; /* Hide tooltips on mobile */
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 1rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .skills h2, .about h2, .projects h2, .contact h2 {
        font-size: 2rem;
    }
    
    .project-grid {
        grid-template-columns: 1fr;
    }
}

/* Обновляем для светлой темы */
body.light-theme header {
    background-color: rgba(255, 255, 255, 0.6);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

body.light-theme header.scrolled {
    background-color: rgba(255, 255, 255, 0.75);
}
