* {
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.card {
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
    background-color: white;
    color: #1f2937;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.dark .card {
    background-color: #1e293b;
    border-color: #334155;
    color: white;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: background-color 0.2s ease, color 0.2s ease;
    outline: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem 0.75rem;
}

.btn:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.btn:disabled {
    pointer-events: none;
    opacity: 0.5;
}

.btn-outline {
    border: 1px solid #d1d5db;
    background-color: white;
    color: #374151;
}

.btn-outline:hover {
    background-color: #f9fafb;
}

.dark .btn-outline {
    border-color: #475569;
    background-color: #1e293b;
    color: #cbd5e1;
}

.dark .btn-outline:hover {
    background-color: #334155;
}

.theme-icon {
    transition: transform 0.2s ease, opacity 0.2s ease;
}

#theme-menu {
    animation: fadeIn 0.2s ease;
    right: 0;
    width: 12rem;
}

@media (max-width: 768px) { 
    #theme-menu {
        left: 50%;
        transform: translateX(-50%);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .header-buttons {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .header-buttons > * {
        min-width: 80px;
    }
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background-color: #f1f5f9;
}

.dark ::-webkit-scrollbar-track {
    background-color: #1e293b;
}

::-webkit-scrollbar-thumb {
    background-color: #d1d5db;
    border-radius: 9999px;
}

.dark ::-webkit-scrollbar-thumb {
    background-color: #475569;
}

::-webkit-scrollbar-thumb:hover {
    background-color: #9ca3af;
}

.dark ::-webkit-scrollbar-thumb:hover {
    background-color: #64748b;
}

.project-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover {
    transform: translateY(-2px);
}

.skill-badge {
    background-color: #dbeafe;
    color: #1e40af;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
}

.dark .skill-badge {
    background-color: #1e3a8a;
    color: #bfdbfe;
}

.time-badge {
    background-color: #f1f5f9;
    color: #64748b;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
}

.dark .time-badge {
    background-color: #334155;
    color: #94a3b8;
}

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
}

.contact-item svg {
    width: 1rem;
    height: 1rem;
    color: #6b7280;
}

.dark .contact-item svg {
    color: #9ca3af;
}

.dark a {
    color: #fff;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.section-title svg {
    width: 1.25rem;
    height: 1.25rem;
}

#theme-toggle {
    color: #374151;
}

.dark #theme-toggle {
    color: white;
}

#theme-toggle:hover {
    background-color: #f3f4f6;
}

.dark #theme-toggle:hover {
    background-color: #374151;
}

#theme-toggle svg {
    color: inherit;
}

.telegram-btn {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #0088cc, #229ed9);
    border: none;
    color: white;
    transition: all 0.3s ease;
}

.telegram-btn:hover {
    background: linear-gradient(135deg, #229ed9, #0088cc);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(34, 158, 217, 0.4);
    border-color: #0088cc;
}

.telegram-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(34, 158, 217, 0.3);
}

.telegram-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;
}

.telegram-btn:hover::before {
    width: 300px;
    height: 300px;
}

.dark .telegram-btn {
    background: linear-gradient(135deg, #0088cc, #229ed9);
    border-color: #0088cc;
}

.dark .telegram-btn:hover {
    background: linear-gradient(135deg, #229ed9, #40a7e3);
    box-shadow: 0 8px 25px rgba(34, 158, 217, 0.5);
}

.github-btn {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #24292e, #586069);
    border: none;
    color: white;
    transition: all 0.3s ease;
}

.github-btn:hover {
    background: linear-gradient(135deg, #586069, #6f42c1);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(36, 41, 46, 0.4);
    border-color: #24292e;
}

.github-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(36, 41, 46, 0.3);
}

.github-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;
}

.github-btn:hover::before {
    width: 300px;
    height: 300px;
}

.dark .github-btn {
    background: linear-gradient(135deg, #21262d, #30363d);
    border-color: #21262d;
}

.dark .github-btn:hover {
    background: linear-gradient(135deg, #30363d, #484f58);
    box-shadow: 0 8px 25px rgba(33, 38, 45, 0.5);
}
