:root {
    /* Основные цвета */
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #10b981;
    --secondary-dark: #059669;
    --dark: #1f2937;
    --darker: #111827;
    --light: #f9fafb;
    --lighter: #ffffff;
    --gray: #9ca3af;
    --gray-light: #e5e7eb;
    --gray-dark: #6b7280;
    
    /* Эффекты */
    --glass: rgba(255, 255, 255, 0.1);
    --glass-dark: rgba(0, 0, 0, 0.1);
    --shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 25px 50px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --border-radius: 16px;
    --border-radius-lg: 24px;
    --border-radius-xl: 32px;
}

/* Темная тема */
[data-theme="dark"] {
    --dark: #f9fafb;
    --light: #111827;
    --lighter: #1f2937;
    --gray: #9ca3af;
    --gray-light: #374151;
    --gray-dark: #d1d5db;
    --glass: rgba(31, 41, 55, 0.5);
    --shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Базовые стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background: var(--light);
    overflow-x: hidden;
    transition: var(--transition-slow);
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(16, 185, 129, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(139, 92, 246, 0.05) 0%, transparent 50%);
    z-index: -1;
    pointer-events: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 6rem 0;
}

@media (max-width: 768px) {
    section {
        padding: 4rem 0;
    }
    .container {
        padding: 0 1.5rem;
    }
}

/* Прелоадер */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--darker);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

.preloader-content {
    text-align: center;
}

.preloader-spinner {
    position: relative;
    width: 120px;
    height: 120px;
}

.spinner-circle {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 4px solid transparent;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.spinner-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 2px;
}

/* Навигация */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1rem 0;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 1000;
    transition: var(--transition);
}

[data-theme="dark"] .navbar {
    background: rgba(31, 41, 55, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
}

[data-theme="dark"] .logo-name {
    color: white;
}

.logo-title {
    font-size: 0.8rem;
    color: var(--gray);
    font-weight: 500;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 12px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .nav-link {
    color: var(--gray-dark);
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--primary);
    transition: var(--transition);
    z-index: -1;
}

.nav-link:hover::before {
    left: 0;
}

.nav-link:hover,
.nav-link.active {
    color: white;
}

.nav-link i {
    font-size: 1.1rem;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--dark);
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--gray-light);
    transition: var(--transition);
}

[data-theme="dark"] .mobile-menu-btn {
    color: white;
    background: var(--gray);
}

.mobile-menu-btn:hover {
    background: var(--primary);
    color: white;
}

/* Герой секция */
.hero {
    padding-top: 10rem;
    position: relative;
    overflow: hidden;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 2rem;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.typing-text {
    color: var(--gray);
    font-weight: 600;
}

.hero-description {
    font-size: 1.2rem;
    color: var(--gray);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--dark);
    border: 2px solid var(--gray-light);
}

[data-theme="dark"] .btn-secondary {
    color: white;
    border-color: var(--gray);
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-3px);
}

.hero-stats {
    display: flex;
    gap: 3rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--gray);
}

.hero-visual {
    position: relative;
}

.floating-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-light), var(--secondary));
    opacity: 0.1;
    animation: float 6s ease-in-out infinite;
}

.shape-1 {
    width: 200px;
    height: 200px;
    top: -50px;
    right: -50px;
    animation-delay: 0s;
}

.shape-2 {
    width: 150px;
    height: 150px;
    bottom: 50px;
    left: -30px;
    animation-delay: 2s;
}

.shape-3 {
    width: 100px;
    height: 100px;
    bottom: -30px;
    right: 100px;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(10deg); }
}

.code-terminal {
    background: var(--darker);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    position: relative;
    z-index: 2;
}

.terminal-header {
    background: #2d3748;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.terminal-dots {
    display: flex;
    gap: 0.5rem;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot-red { background: #f56565; }
.dot-yellow { background: #ecc94b; }
.dot-green { background: #48bb78; }

.terminal-title {
    color: var(--gray);
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.terminal-content {
    padding: 1.5rem;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #cbd5e0;
}

.terminal-line {
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.prompt {
    color: var(--secondary);
}

.command {
    color: white;
}

.output {
    color: #a0aec0;
    padding-left: 1.5rem;
}

.blinking {
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.cursor {
    animation: blink 1s infinite;
}

/* Секции */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.title-number {
    color: var(--primary);
    opacity: 0.5;
    font-size: 1.5rem;
}

.title-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    color: var(--gray);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Обо мне */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-image {
    position: relative;
}

.image-frame {
    background: var(--lighter);
    border-radius: var(--border-radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.image-frame::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.image-placeholder {
    width: 100%;
    aspect-ratio: 1;
    background: linear-gradient(135deg, var(--primary-light), var(--secondary));
    border-radius: var(--border-radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 4rem;
}

.image-badge {
    position: absolute;
    bottom: -20px;
    right: 30px;
    background: var(--primary);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    box-shadow: var(--shadow);
}

.about-text h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--dark);
}

[data-theme="dark"] .about-text h3 {
    color: white;
}

.about-text p {
    color: var(--gray);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.about-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
}

.info-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.info-item i {
    color: var(--primary);
    font-size: 1.2rem;
    margin-top: 0.2rem;
}

.info-item h4 {
    font-size: 1rem;
    margin-bottom: 0.3rem;
    color: var(--dark);
}

[data-theme="dark"] .info-item h4 {
    color: white;
}

.info-item p {
    font-size: 0.9rem;
    margin: 0;
    color: var(--gray);
}

/* Навыки */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    margin-bottom: 3rem;
}

.skill-category {
    background: var(--lighter);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.skill-category:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.skill-category h3 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

[data-theme="dark"] .skill-category h3 {
    color: white;
}

.skill-category h3 i {
    color: var(--primary);
}

.skill-items {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.skill-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.skill-name {
    min-width: 100px;
    font-weight: 500;
    color: var(--dark);
}

[data-theme="dark"] .skill-name {
    color: var(--gray-dark);
}

.skill-bar {
    flex: 1;
    height: 8px;
    background: var(--gray-light);
    border-radius: 4px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 4px;
    width: 0;
    transition: width 1.5s ease-in-out;
}

.skill-percent {
    min-width: 40px;
    text-align: right;
    font-weight: 600;
    color: var(--primary);
}

.skills-extra {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.skill-tag {
    background: var(--lighter);
    color: var(--dark);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 2px solid var(--gray-light);
    transition: var(--transition);
}

[data-theme="dark"] .skill-tag {
    background: var(--dark);
    color: white;
}

.skill-tag:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

/* Проекты */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.project-card {
    background: var(--lighter);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.project-image {
    height: 200px;
    background: linear-gradient(135deg, var(--primary-light), var(--secondary));
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
}

.project-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: rgba(255, 255, 255, 0.9);
    color: var(--dark);
    padding: 0.3rem 1rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
}

[data-theme="dark"] .project-badge {
    background: rgba(0, 0, 0, 0.7);
    color: white;
}

.project-content {
    padding: 2rem;
}

.project-content h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--dark);
}

[data-theme="dark"] .project-content h3 {
    color: white;
}

.project-content p {
    color: var(--gray);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.project-tech {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.project-tech span {
    background: var(--gray-light);
    color: var(--dark);
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

[data-theme="dark"] .project-tech span {
    background: var(--dark);
    color: white;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.project-link:hover {
    color: var(--primary-dark);
    gap: 0.8rem;
}

/* Контакты */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.contact-card {
    background: var(--lighter);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.contact-details h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

[data-theme="dark"] .contact-details h3 {
    color: white;
}

.contact-details a {
    display: block;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 0.3rem;
    transition: var(--transition);
}

.contact-details a:hover {
    color: var(--primary-dark);
}

.contact-details p {
    color: var(--gray);
    font-size: 0.9rem;
}

.contact-form {
    background: var(--lighter);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.contact-form h3 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: var(--dark);
}

[data-theme="dark"] .contact-form h3 {
    color: white;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--gray-light);
    border-radius: 12px;
    background: var(--light);
    color: var(--dark);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: var(--transition);
}

[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group textarea {
    background: var(--dark);
    color: white;
    border-color: var(--gray);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Футер */
.footer {
    background: var(--darker);
    color: white;
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer-description {
    color: var(--gray);
    margin-top: 1rem;
    line-height: 1.6;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.footer-links h3,
.footer-social h3 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: white;
}

.footer-links a {
    color: var(--gray);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary);
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: var(--transition);
}

.social-link:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: var(--gray);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Панель темы */
.theme-panel {
    position: fixed;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    background: var(--lighter);
    border-radius: var(--border-radius);
    padding: 1rem;
    box-shadow: var(--shadow);
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.theme-toggle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary);
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.theme-toggle i {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: var(--transition);
}

.theme-toggle .fa-sun {
    opacity: 0;
}

[data-theme="dark"] .theme-toggle .fa-moon {
    opacity: 0;
}

[data-theme="dark"] .theme-toggle .fa-sun {
    opacity: 1;
}

.theme-toggle:hover {
    transform: rotate(30deg);
}

.theme-colors {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.theme-color {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
}

.theme-color:hover {
    transform: scale(1.1);
}

.theme-color.active {
    border-color: white;
    box-shadow: 0 0 0 2px var(--dark);
}

[data-theme="dark"] .theme-color.active {
    border-color: var(--dark);
    box-shadow: 0 0 0 2px white;
}

/* Кнопка наверх */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition);
    z-index: 100;
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top:hover {
    background: var(--primary-dark);
    transform: translateY(-5px);
}

/* Адаптивность */
@media (max-width: 992px) {
    .hero .container,
    .about-content,
    .contact-content,
    .skills-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .hero-title {
        font-size: 2.8rem;
    }
    
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--lighter);
        padding: 1rem;
        flex-direction: column;
        box-shadow: var(--shadow-lg);
        border-radius: 0 0 var(--border-radius) var(--border-radius);
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .hero-actions {
        flex-direction: column;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 2rem;
    }
    
    .about-info {
        grid-template-columns: 1fr;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .theme-panel {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2.2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
}
/* Дополнительные улучшения для калькулятора */
.calc-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3);
}

.calc-btn.operator:focus {
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.5);
}

.calc-btn.equals:focus {
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.5);
}

.calc-btn.clear:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.5);
}

/* Анимация появления калькулятора */
.calculator {
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}