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

body {
    display: flex;
    min-height: 100vh;
    background-color: #1e1f29;
    font-family: 'Fira Code', 'Consolas', monospace;
    color: #f8f8f2;
}
/* Sidebar styles */
.sidebar {
    width: 300px;
    background-color: #282a36;
    padding: 30px 20px;
    border-right: 2px solid #44475a;
    display: flex;
    flex-direction: column;
}
/* Avatar/photo */
.avatar {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8be9fd, #282a36);
    margin: 0 auto 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    color: #282a36;
    font-weight: bold;
}
.language-switcher {
    display: inline-block;
    margin-bottom: 40px;
    background-color: rgba(40, 42, 54, 0.8);
    padding: 16px;
    border-radius: 7px;
    border: 1px solid #8be9fd;
    text-decoration: none;
    color: #ff79c6;

    transition: all 0.3s ease; /* плавность при наведении */

}
.language-switcher:hover {
    background-color: rgba(40, 42, 54, 1);
    border: 4px solid #ff79c6;  /* меняем цвет при наведении */
    transform: translateX(5px);      /* небольшой эффект */
    color: #8be9fd;

}
/* Contact information */
.contact-info {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #44475a;
}
.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    color: #f8f8f2;
    text-decoration: none;
    transition: color 0.3s;
}

.contact-item:hover {
    color: #ff79c6;
}

.contact-item i {
    margin-right: 10px;
    color: #8be9fd;
    width: 20px;
    text-align: center;
}

.stat-circle {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 8px;
}

#leetcodeStats div {
    margin-bottom: 12px;  /* ← ЭТО ДАСТ РАССТОЯНИЕ МЕЖДУ СТРОКАМИ */
}
.stat-circle {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 6px;
}
.circle-easy { background-color: #ff79c6; }
.circle-medium { background-color: #8be9fd; }
.circle-hard { background-color: #1e1f2c; }

/* Убираем лишние отступы у секции с графиком */
.section:last-of-type {
    margin-bottom: 0;
    padding-bottom: 0;
}

/* Конкретно для блока LeetCode - убираем пустоту */
#leetcodeStats,
#myPieChart {
    margin: 0;
    padding: 0;
}

/* Блок с графиком и статистикой */
.section > div[style*="display: flex"] {
    margin: 0 !important;
    padding: 0 !important;
}

/* Skills in sidebar */
.skills-list {
    margin-top: 20px;
}

.skill-tag {
    display: inline-block;
    background-color: #44475a;
    color: #8be9fd;
    padding: 5px 10px;
    margin: 3px;
    border-radius: 4px;
    font-size: 12px;
}

/* Main content */
.main-content {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
}

.section {
    margin-bottom: 40px;
    background-color: rgba(40, 42, 54, 0.8);
    padding: 25px;
    border-radius: 10px;
    border-left: 4px solid #8be9fd;
}

h2 {
    color: #8be9fd;
    margin-bottom: 20px;
    font-size: 28px;
}

h3 {
    color: #ff79c6;
    margin-bottom: 15px;
    font-size: 20px;
}

/* Certificate gallery styles */
.certificates-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
}

.cert-item {
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border-radius: 8px;
    overflow: hidden;
}

.cert-item:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

.cert-item img {
    width: 180px;
    height: 250px;
    object-fit: cover;
    display: block;
    border-radius: 8px;
}

/* Lightbox / Slider styles */
.lightbox-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.lightbox-modal.active {
    display: flex;
}

.slider-container {
    position: relative;
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.slider-image {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(139, 233, 253, 0.8);
    color: #282a36;
    border: none;
    font-size: 32px;
    padding: 12px 18px;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.2s;
    z-index: 2001;
    font-weight: bold;
}

.slider-btn:hover {
    background-color: #8be9fd;
    transform: translateY(-50%) scale(1.05);
}

.prev-btn {
    left: 20px;
}

.next-btn {
    right: 20px;
}

.close-lightbox {
    position: absolute;
    top: 20px;
    right: 40px;
    font-size: 40px;
    color: #ff79c6;
    cursor: pointer;
    z-index: 2001;
    transition: color 0.2s;
    background: none;
    border: none;
}

.close-lightbox:hover {
    color: #8be9fd;
}

.counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(40, 42, 54, 0.8);
    padding: 8px 16px;
    border-radius: 20px;
    color: #8be9fd;
    font-family: monospace;
    font-size: 14px;
    z-index: 2001;
}

/* Mobile menu button (hide/show sidebar) */
.menu-toggle {
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    background: #ff79c6;
    color: #282a36;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    z-index: 1000;
    font-family: 'Fira Code';
    font-weight: bold;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .sidebar {
        position: fixed;
        left: -300px;
        top: 0;
        height: 100vh;
        transition: left 0.3s;
        z-index: 999;
    }

    .sidebar.active {
        left: 0;
    }

    .main-content {
        padding: 80px 20px 20px;
    }

    .cert-item img {
        width: 140px;
        height: 200px;
    }
}
/* Убираем внутренние отступы у секции с графиком */
.section:has(canvas) {
    padding-top: 15px !important;
    padding-bottom: 15px !important;
}

/* Убираем лишнюю высоту у canvas */
#myPieChart {
    display: block;
    max-height: 200px !important;
    width: auto !important;
}

/* Сжимаем отступы внутри flex-контейнера */
.section > div[style*="display: flex"] {
    gap: 20px !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* Убираем отступы у заголовка внутри секции */
.section > h2 {
    margin-bottom: 10px !important;
}