@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700&display=swap');

:root {
    --primary-color: #6a11cb;
    --secondary-color: #2575fc;
    --text-color: #e0e0e0;
    --bg-color: #121212;
    --card-bg-color: #1e1e1e;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.7;
    overflow-x: hidden;
}

/* Language Switcher */
.language-switcher {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 100;
}

.language-switcher a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 1rem;
    padding: 5px 10px;
    margin-left: 5px;
    border: 1px solid transparent;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.language-switcher a:hover {
    border-color: white;
}

.language-switcher a.active {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: white;
}


/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    animation: gradient-animation 15s ease infinite;
    background-size: 200% 200%;
    padding: 0 2rem;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.profile-pic {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 4px solid white;
    object-fit: cover;
    margin-bottom: 1.5rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
    color: white;
}

.hero-content p {
    font-size: 1.5rem;
    font-weight: 400;
    color: white;
}

.hero-content .subtitle {
    font-size: 1.2rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 0.5rem;
}

@keyframes gradient-animation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* General Container */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 5rem 2rem;
}

h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

h3 {
    font-size: 1.5rem;
    margin-top: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--secondary-color);
    border-bottom: 2px solid var(--card-bg-color);
    padding-bottom: 0.5rem;
}

#about p {
    font-size: 1.1rem;
    text-align: left;
    max-width: 900px;
    margin: 0 auto 1.5rem auto;
}

/* Skills Section */
.skills-grid {
    display: grid;
    /*
       Увеличили минимальную ширину с 150px до 180px.
       Теперь сетка создаст 5 колонок в этом ряду, а не 6,
       и карточки станут шире.
    */
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
    text-align: center;
}

.skill-card {
    background-color: var(--card-bg-color);
    padding: 1.5rem;
    border-radius: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    font-size: 0.9rem;
    font-weight: bold;
}

.skill-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Projects Section */
.projects-note {
    text-align: center;
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    font-style: italic;
    color: var(--text-color);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--card-bg-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
}

.project-card.placeholder {
    border: 2px dashed var(--secondary-color);
    opacity: 0.7;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.project-card:hover {
    transform: scale(1.03);
}

.project-card h3 {
    font-size: 1.5rem;
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--text-color);
    border: none;
}

.project-card p {
    margin-bottom: 1rem;
    flex-grow: 1;
}

.project-tags {
    margin-bottom: 1rem;
}

.project-tags span {
    background: var(--primary-color);
    padding: 0.3rem 0.7rem;
    border-radius: 5px;
    font-size: 0.8rem;
    margin-right: 0.5rem;
    display: inline-block;
    margin-top: 5px;
}

/* Buttons & Links */
.btn {
    display: inline-block;
    padding: 0.7rem 1.5rem;
    background-color: transparent;
    border: 2px solid var(--secondary-color);
    color: var(--secondary-color);
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s, color 0.3s;
    margin-right: 10px;
    margin-top: 10px;
    font-weight: bold;
}

.btn:hover {
    background-color: var(--secondary-color);
    color: white;
}

/* Contact Section */
#contact {
    text-align: center;
    padding-bottom: 5rem;
}

.social-links {
    margin-top: 1.5rem;
}

#contact p {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

#contact a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
}

#contact a:hover {
    color: var(--primary-color);
}

/* Responsive */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
    .hero-content p {
        font-size: 1.2rem;
    }
    .hero-content .subtitle {
        font-size: 1rem;
    }
    h2 {
        font-size: 2rem;
    }
    .container {
        padding: 3rem 1.5rem;
    }
}