:root {
    --bg: #121212;
    --text: #f5f5f5;
    --accent: #bb86fc;
    --card-bg: #1e1e1e;
    --telegram: #0088cc;
    --vkontakte: #07f;
    --github: #f5f5f5;
    --email: #EA4335;
    --steam: #171a21;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text);
    background-color: var(--bg);
    display: flex;
    justify-content: center;
    align-items: center;
}

.main-container {
    text-align: center;
    z-index: 1;
    width: 100%;
    padding: 2rem;
    box-sizing: border-box;
}

.content {
    max-width: 1200px;
    margin: 0 auto;
}

.content h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: rgba(245, 245, 245, 0.8);
}

/* Стили для проектов */
.projects-section {
    margin: 3rem auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.projects-toggle {
    background: rgba(187, 134, 252, 0.1);
    color: var(--accent);
    border: 2px solid var(--accent);
    border-radius: 30px;
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin: 2rem auto;
    transition: all 0.3s ease;
}

.projects-toggle:hover {
    background: rgba(187, 134, 252, 0.2);
    transform: translateY(-2px);
}

.projects-toggle i {
    transition: transform 0.3s ease;
}

.projects-toggle.active i {
    transform: rotate(180deg);
}

.projects-container {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out;
    width: 100%;
}

.projects-container.visible {
    max-height: 2000px;
    transition: max-height 0.5s ease-in;
}

.projects-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    width: 100%;
    margin-top: 1.5rem;
    padding: 0 1rem;
}

.project-card {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
    width: 250px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

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

.project-name {
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.project-name i {
    color: var(--accent);
}

.project-desc {
    color: rgba(245, 245, 245, 0.7);
    margin-bottom: 1rem;
    /* Ограничение описания 3 строками */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 60px;
    line-height: 1.4;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    margin-top: auto;
}

.project-link:hover {
    text-decoration: underline;
}

/* Социальные ссылки - исправленные */
.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    background-color: #1a1a1a;
    overflow: hidden;
    box-shadow: 0 0 0 2px #1a1a1a; /* Дублируем цвет фона */
    -webkit-transform: perspective(1px) translateZ(0);
    transform: perspective(1px) translateZ(0);
    line-height: 1; /* Добавьте это */
}


.social-link:hover {
    transform: translateY(-5px) scale(1.1);
}

/* Убираем все псевдоэлементы */
.social-link::before,
.social-link::after {
    content: none !important;
}
.social-link svg {
    display: block;
    width: 100%;
    height: 100%;
    fill: currentColor;
    display: block;
}

.telegram { background-color: var(--telegram); }
.vkontakte { background-color: var(--vkontakte); }
.github { 
    background-color: var(--github); 
    color: #121212 !important;
    /* Фикс для GitHub иконки */
    -webkit-text-stroke: 0.5px var(--bg);
}
.email { background-color: var(--email); }
.steam { background-color: var(--steam); }

/* Анимация фона */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: var(--bg);
    overflow: hidden;
}

.circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.15;
}

.circle-1 {
    width: 300px;
    height: 300px;
    background: var(--accent);
    top: 20%;
    left: 10%;
    animation: float 15s infinite ease-in-out;
}

.circle-2 {
    width: 200px;
    height: 200px;
    background: #03DAC6;
    top: 60%;
    left: 70%;
    animation: float 12s infinite ease-in-out reverse;
}

.circle-3 {
    width: 150px;
    height: 150px;
    background: #CF6679;
    top: 30%;
    left: 50%;
    animation: float 18s infinite ease-in-out;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(50px, 50px); }
}

/* Состояния */
.loading, .error {
    padding: 1rem;
    text-align: center;
    color: rgba(245, 245, 245, 0.7);
    width: 100%;
}

.error {
    color: #ff6b6b;
}

.fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Адаптивность */
@media (max-width: 600px) {
    .content h1 {
        font-size: 2.5rem;
    }
    
    .social-link {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }
    
    .project-card {
        width: 100%;
        max-width: 300px;
    }
}
