:root {
    --bg-main: #0f172a;       /* Глубокий темный */
    --bg-card: #1e293b;       /* Светлее для карточек */
    --accent: #38bdf8;        /* Неоновый голубой */
    --accent-hover: #0ea5e9;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --glass: rgba(30, 41, 59, 0.7);
}

* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Навигация --- */
.navbar {
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: background 0.3s;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    font-family: 'Fira Code', monospace;
    font-weight: 700;
    color: var(--accent);
    text-decoration: none;
    font-size: 1.2rem;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
    align-items: center;
    transition: max-height 0.3s ease-in-out;
}

.nav-links.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    background: var(--bg-main);
    padding: 20px;
    gap: 15px;
    max-height: 300px;
}

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.95rem;
    transition: 0.3s;
}

.nav-links a:hover { 
    color: var(--accent); 
}

.btn-contact {
    border: 1px solid var(--accent);
    padding: 8px 20px;
    border-radius: 5px;
    color: var(--accent) !important;
}

.btn-contact:hover {
    background: var(--accent);
    color: var(--bg-main) !important;
}

.burger-menu {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.5rem;
    cursor: pointer;
}

/* --- Hero Section --- */
.hero {
    padding-top: 140px;
    padding-bottom: 80px;
    display: flex;
    align-items: center;
    min-height: 90vh;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.badge {
    background: rgba(56, 189, 248, 0.1);
    color: var(--accent);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.hero h1 {
    font-size: 3.5rem;
    margin: 20px 0 10px;
    line-height: 1.1;
}

.highlight {
    color: transparent;
    background: linear-gradient(90deg, var(--accent), #818cf8);
    -webkit-background-clip: text;
    background-clip: text;
}

.hero h2 {
    font-size: 1.5rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-bottom: 25px;
}

.hero-buttons {
    margin-top: 30px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 28px;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    transition: 0.3s;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}

.btn-primary {
    background: var(--accent);
    color: var(--bg-main);
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

.btn-outline {
    border: 1px solid var(--text-muted);
    color: var(--text-main);
    background: transparent;
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.btn-outline.disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

/* Фото в Hero */
.hero-image-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
}

.hero-img {
    width: 350px;
    height: 350px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--bg-card);
    box-shadow: 0 0 50px rgba(56, 189, 248, 0.2);
    z-index: 2;
    transition: transform 0.3s;
}

.hero-image-wrapper:hover .hero-img {
    transform: scale(1.05);
}

.blob {
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(56,189,248,0.2), transparent);
    border-radius: 50%;
    filter: blur(50px);
    z-index: 1;
}

/* --- Секции --- */
.section {
    padding: 80px 0;
}

.bg-darker {
    background: linear-gradient(to bottom, var(--bg-main), #111827);
}

.section-heading {
    font-size: 2.5rem;
    margin-bottom: 50px;
    text-align: center;
    position: relative;
}

.section-heading::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: var(--accent);
    margin: 15px auto 0;
}

/* --- Timeline (Experience) --- */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 30px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--accent);
}

.timeline-item {
    display: flex;
    margin-bottom: 40px;
    position: relative;
}

.timeline-date {
    flex: 0 0 150px;
    padding-right: 30px;
    text-align: right;
    color: var(--accent);
    font-weight: 600;
    font-size: 0.9rem;
}

.timeline-content {
    flex: 1;
    padding-left: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.timeline-content h3 {
    margin-bottom: 5px;
    color: var(--text-main);
}

.timeline-subtitle {
    color: var(--accent);
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 26px;
    top: 5px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
    border: 3px solid var(--bg-main);
}

/* --- Проекты --- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.project-card {
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    transition: 0.4s;
    border: 1px solid rgba(255,255,255,0.05);
    cursor: pointer;
    opacity: 0;
    transform: translateY(30px);
}

.project-card.fade-in {
    opacity: 1;
    transform: translateY(0);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    border-color: var(--accent);
}

.card-thumb {
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.card-overlay {
    position: absolute;
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    background: rgba(15, 23, 42, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.project-card:hover .card-overlay { 
    opacity: 1; 
}

.card-info {
    padding: 25px;
}

.card-info h3 { 
    margin-bottom: 10px; 
    font-size: 1.4rem; 
}

.card-info p { 
    color: var(--text-muted); 
    font-size: 0.9rem; 
    margin-bottom: 15px; 
}

.mini-tags span {
    font-size: 0.75rem;
    background: rgba(255,255,255,0.1);
    padding: 4px 8px;
    border-radius: 4px;
    margin-right: 5px;
    color: var(--accent);
}

/* --- Навыки --- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.skill-category {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    transition: transform 0.3s;
    opacity: 0;
    transform: translateY(30px);
}

.skill-category.fade-in {
    opacity: 1;
    transform: translateY(0);
}

.skill-category:hover {
    transform: translateY(-5px);
}

.skill-category h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.tags span {
    display: inline-block;
    background: rgba(56,189,248,0.1);
    color: var(--accent);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    transition: background 0.3s;
}

.tags span:hover {
    background: rgba(56,189,248,0.2);
}

/* --- Достижения --- */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.achievement-card {
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid rgba(255,255,255,0.05);
    opacity: 0;
    transform: translateY(30px);
}

.achievement-card.fade-in {
    opacity: 1;
    transform: translateY(0);
}

.achievement-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(56, 189, 248, 0.1);
    border-color: var(--accent);
}

.achievement-card i {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 20px;
}

.achievement-card h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.achievement-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* --- Футер --- */
footer {
    background: var(--bg-card);
    padding: 60px 0;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.contact-info {
    flex: 1;
}

.contact-info h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.email-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    display: block;
    margin: 10px 0;
}

.email-link:hover {
    text-decoration: underline;
}

.telegram-widget a {
    color: var(--accent);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 15px;
}

.telegram-widget i {
    font-size: 1.2rem;
}

.socials {
    display: flex;
    gap: 20px;
}

.socials a {
    color: var(--text-main);
    font-size: 1.5rem;
    transition: color 0.3s;
}

.socials a:hover {
    color: var(--accent);
}

.visit-counter {
    margin-top: 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.copyright {
    margin-top: 30px;
    text-align: center;
    width: 100%;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* --- Модальное окно (Галерея) --- */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0; 
    top: 0;
    width: 100%; 
    height: 100%;
    background: rgba(0,0,0,0.9);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn { 
    from { opacity: 0; } 
    to { opacity: 1; } 
}

.modal-content {
    background: var(--bg-card);
    width: 90%;
    max-width: 900px;
    border-radius: 15px;
    position: relative;
    border: 1px solid rgba(255,255,255,0.1);
    overflow: hidden;
    animation: zoomIn 0.3s;
}

@keyframes zoomIn { 
    from { transform: scale(0.9); opacity: 0; } 
    to { transform: scale(1); opacity: 1; } 
}

.close-modal {
    position: absolute;
    top: 15px; 
    right: 20px;
    background: none; 
    border: none;
    color: white; 
    font-size: 2rem;
    cursor: pointer;
    z-index: 10;
    transition: color 0.3s;
}

.close-modal:hover { 
    color: var(--accent); 
}

/*/* Слайдер */
.modal-body {
    display: flex;
    flex-direction: row;
    gap: 30px;
}

.slider-container {
    position: relative;
    flex: 1;
    height: 400px;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    overflow: hidden;
}

.slider-track {
    display: flex;
    transition: transform 0.5s ease;
}

.slider-track img {
    width: 100%;
    height: 400px;
    object-fit: contain;
    flex-shrink: 0;
    transition: opacity 0.3s;
}
.slider-track .slide {
    flex: 0 0 100%; /* Каждый слайд занимает 100% ширины контейнера */
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.slider-track img.active {
    opacity: 1;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    padding: 15px;
    cursor: pointer;
    font-size: 1.5rem;
    border-radius: 50%;
    transition: 0.3s;
}

.slider-btn:hover { 
    background: var(--accent); 
}

.prev-btn { 
    left: 10px; 
}

.next-btn { 
    right: 10px; 
}

.slider-indicators {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.slider-indicators span {
    width: 10px;
    height: 10px;
    background: rgba(255,255,255,0.3);
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s;
}

.slider-indicators span.active {
    background: var(--accent);
}*/
/* Исправленный слайдер - показывает только одну картинку */
.slider-container {
    position: relative;
    flex: 1;
    height: 500px;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
}

.slider-track {
    display: flex;
    height: 100%;
    width: 100%;
    transition: transform 0.5s ease-in-out;
}

/* КАЖДЫЙ СЛАЙД ЗАНИМАЕТ 100% КОНТЕЙНЕРА */
.slider-track .slide {
    flex: 0 0 100%; /* Каждый слайд занимает 100% ширины контейнера */
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-track img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    padding: 10px;
}

/* Стрелки для переключения */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(56, 189, 248, 0.8);
    color: white;
    border: none;
    padding: 15px 20px;
    cursor: pointer;
    font-size: 1.5rem;
    border-radius: 5px;
    transition: 0.3s;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-btn:hover { 
    background: var(--accent); 
    transform: translateY(-50%) scale(1.1);
}

.prev-btn { 
    left: 20px; 
}

.next-btn { 
    right: 20px; 
}

/* Индикаторы внизу */
.slider-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.slider-indicators span {
    width: 12px;
    height: 12px;
    background: rgba(255,255,255,0.3);
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s, transform 0.3s;
}

.slider-indicators span:hover {
    transform: scale(1.2);
}

.slider-indicators span.active {
    background: var(--accent);
    transform: scale(1.2);
}
.project-details {
    flex: 1;
    padding: 30px;
}

.tech-stack-modal .badge {
    background: rgba(56,189,248,0.1);
    color: var(--accent);
    padding: 5px 10px;
    border-radius: 20px;
    margin: 0 5px 10px 0;
    display: inline-block;
    font-size: 0.85rem;
}

.certificate-badge {
    margin: 15px 0;
}

.certificate-badge .badge {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.modal-footer { 
    margin-top: 20px; 
}

/* Анимации */
.fade-element {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-element.fade-in {
    opacity: 1;
    transform: translateY(0);
}

/* Адаптивность */
@media (max-width: 1024px) {
    .hero-container { 
        grid-template-columns: 1fr; 
        text-align: center; 
    }
    
    .hero-image-wrapper { 
        order: -1; 
        margin-bottom: 30px; 
    }
    
    .hero-img { 
        width: 250px; 
        height: 250px; 
    }
    
    .blob { 
        width: 300px; 
        height: 300px; 
    }
    
    .modal-body { 
        flex-direction: column; 
    }
    
    .slider-container { 
        height: 300px; 
    }
    
    .slider-track img { 
        height: 300px; 
    }
    
    .timeline::before {
        left: 20px;
    }
    
    .timeline-date {
        flex: 0 0 120px;
    }
}

@media (max-width: 768px) {
    .nav-links { 
        display: none; 
        max-height: 0; 
        overflow: hidden; 
    }
    
    .burger-menu { 
        display: block; 
    }
    
    .hero h1 { 
        font-size: 2.5rem; 
    }
    
    .hero h2 { 
        font-size: 1.2rem; 
    }
    
    .section-heading { 
        font-size: 2rem; 
    }
    
    .slider-container { 
        height: 250px; 
    }
    
    .slider-track img { 
        height: 250px; 
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .timeline-item {
        flex-direction: column;
    }
    
    .timeline-date {
        text-align: left;
        padding-right: 0;
        margin-bottom: 10px;
        font-weight: bold;
    }
    
    .timeline-content {
        padding-left: 20px;
    }
    
    .timeline::before {
        left: 10px;
    }
    
    .timeline-item::before {
        left: 6px;
    }
}

@media (max-width: 480px) {
    .projects-grid { 
        grid-template-columns: 1fr; 
    }
    
    .skills-grid, .achievements-grid { 
        grid-template-columns: 1fr; 
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .btn {
        justify-content: center;
    }
}
/* Эффект зума для изображений в слайдере */
.slider-track img {
    transition: transform 0.3s ease;
}

.slider-track img:hover {
    transform: scale(1.02);
}

/* Анимация появления слайда */
@keyframes slideIn {
    from {
        opacity: 0.5;
        transform: translateX(10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide {
    animation: slideIn 0.5s ease-out;
}

/* Индикатор загрузки изображений */
.slider-track img:not([src]) {
    background: linear-gradient(90deg, #1e293b 0%, #2d3748 50%, #1e293b 100%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Подпись к изображению (если нужно добавить) */
.slide::after {
    content: attr(data-caption);
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    text-align: center;
    color: white;
    background: rgba(0,0,0,0.5);
    padding: 5px;
    font-size: 0.9rem;
    opacity: 0;
    transition: opacity 0.3s;
}

.slide:hover::after {
    opacity: 1;
}

