/* 1. Переменные */
:root {
    --bg-color: #0a0a0b;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --gold: #d4af37;
    --gold-glow: rgba(212, 175, 55, 0.2);
    --text-color: #f0f0f0;
    --text-dim: #a0a0a0;
    --neon-green: #00fa9a;
}

/* 2. Сбросы и база */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    /* padding: 0 25px; */
}

/* 3. Навигация */
.glass-nav {
    position: sticky;
    top: 10px;
    margin: 10px 20px;
    z-index: 1000;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    height: 70px;
    display: flex;
    align-items: center;
}

.glass-nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo span {
    color: var(--gold);
    font-weight: bold;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 25px;
}

nav a:hover {
    color: var(--gold);
}

/* 4. Hero Section */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 100px 0;
    gap: 40px;
}

.hero-text h1 {
    font-size: 3.5rem;
    font-weight: 800;
}

.hero-text h2 {
    font-size: 1.5rem;
    color: var(--gold);
}

.hero-text p {
    max-width: 550px;
    font-size: 19px;
    line-height: 20px;
}

.hero-img img {
    width: 280px;
    height: 280px;
    object-fit: cover;
    border-radius: 30px;
    border: 1px solid var(--gold);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 20px var(--gold-glow);
}

/* 5. Навыки */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 20px;
    margin: 40px 0;
}

.skill-card {
    background: var(--glass-bg);
    padding: 25px;
    border-radius: 15px;
    border: 1px solid var(--glass-border);
    text-align: center;
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.skill-card:hover {
    transform: translateY(-10px);
    border-color: var(--gold);
}

.skill-card img {
    width: 45px;
    height: 45px;
    object-fit: contain;
}

/* 6. Карточки проектов */
.card-purple {
    --card-bg: linear-gradient(135deg, #8a2be2, #2e0854);
}

.card-blue {
    --card-bg: linear-gradient(135deg, #0072ff, #001f3f);
}

.card-gold {
    --card-bg: linear-gradient(135deg, #d4af37, #4a3b00);
}

.card-red {
    --card-bg: linear-gradient(135deg, #ff416c, #4b0000);
}

.card-green {
    --card-bg: linear-gradient(135deg, #00b09b, #002e1c);
}

.card-cyan {
    --card-bg: linear-gradient(135deg, #00ffff, #008b8b, #002020);
}

.card-white {
    --card-bg: linear-gradient(135deg, #ffffff, #d1d1d1);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.project-card {
    position: relative;
    height: 380px;
    border-radius: 20px;
    background: var(--card-bg, #111);
    overflow: hidden;
    border: 1px solid var(--glass-border);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.4s ease;
    z-index: 1;
    /* Убирает мерцание на мобилках и в Chrome */
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Эффект подъема карточки */
.project-card:hover {
    transform: translateY(-10px);
    border-color: var(--gold);
    z-index: 10;
}

/* Место под логотип (задний план) */
.card-image-space {
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    transition: opacity 0.3s ease;
}

.card-image-space img {
    max-width: 70%;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.5));
}

/* ОВЕРЛЕЙ - Проверь внимательно этот блок */
.project-card .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;

    background: rgba(0, 0, 0, 0.7);
    /* Темный фон для читаемости */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    /* Начальное состояние: спрятан внизу */
    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    z-index: 5;
    /* Чтобы был выше картинки */
}

/* ТРИГГЕР ХОВЕРА */
.project-card:hover .overlay {
    transform: translateY(0) !important;
    /* Принудительно выезжаем */
    opacity: 1 !important;
}

/* Текст внутри */
.project-card h4 {
    font-size: 1.6rem;
    color: #fff;
    margin-bottom: 8px;
}

.project-card p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 20px;
}

/* Теги */
.project-card .tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.project-card .tag {
    background: var(--neon-green);
    color: #000;
    padding: 5px 14px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 800;
}

/* Ссылки */
.project-card .links a {
    color: var(--gold);
    border: 1px solid var(--gold);
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    display: inline-block;
}

/* 7. Футер */
footer {
    margin-top: 100px;
    padding: 60px 0;
    border-top: 1px solid var(--glass-border);
    text-align: center;
}

.contact-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.contact-info a {
    color: var(--gold);
    font-size: 1.1rem;
}

/* .contact-info a p {
    display: inline-block;
    width: auto;
    margin: 0;
} */

.contact-info a:hover {
    color: var(--text-dim);
}

.footer-bottom {
    font-size: 0.85rem;
    color: var(--text-dim);
}

/* 8. Адаптивность */
@media (max-width: 768px) {
    .hero {
        flex-direction: column-reverse;
        text-align: center;
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }

    nav ul {
        display: none;
    }
}