/* Основные переменные */
:root {
    --gold: #ffd700;
    --gold-hover: #ffecb3;
    --glass: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #ffffff;
    --text-dim: rgba(255, 255, 255, 0.7);
}

/* Обнуление и база */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, sans-serif;
}

body {
    background: #0f172a; /* Глубокий темный фон */
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Фон с эффектом свечения */
.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, #1e293b 0%, #0f172a 100%);
    z-index: -1;
}

/* Навигация */
.glass-nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    z-index: 1000;
}

.loading-text {
    grid-column: 1 / -1; /* Растягивает текст на всю ширину сетки */
    text-align: center;
    padding: 40px;
    opacity: 0.5;
    font-style: italic;
}
.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--gold);
    letter-spacing: 2px;
}

.nav-logo-img {
    height: 45px; /* Высота логотипа */
    width: auto;
    margin-right: 12px;
    filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.3)); /* Легкое золотистое свечение */
    transition: 0.3s;
}

.logo-text {
    font-size: 1.2rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.logo:hover .nav-logo-img {
    transform: scale(1.1); /* Анимация при наведении */
}

@media (max-width: 768px) {
    .nav-logo-img {
        height: 35px;
    }
    .logo-text {
        font-size: 1rem;
    }
}

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    margin-left: 30px;
    font-size: 0.9rem;
    transition: 0.3s;
}

.nav-links a:hover {
    color: var(--gold);
}

/* Главный блок (Hero) */
.hero {
    padding-top: 150px;
    padding-bottom: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
}

.hero-content {
    display: flex;
    align-items: center;
    gap: 50px;
    max-width: 1100px;
    width: 90%;
}

.photo-wrapper img {
    width: 320px;         /* Оставляем комфортную ширину */
    height: auto;          /* КЛЮЧЕВОЕ: высота теперь сама подстроится под фото */
    display: block;
    object-fit: initial;   /* Отключаем любое растягивание */
    border-radius: 30px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.photo-wrapper {
    align-self: flex-start; /* Чтобы рамка не растягивалась по высоте текста */
}

.text-wrapper h1 {
    font-size: 3rem;
    line-height: 1.1;
    margin-bottom: 20px;
}

.accent-text {
    color: var(--gold);
}

.badge {
    background: var(--gold);
    color: #000;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    display: inline-block;
    margin-bottom: 15px;
}


.main-centered {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    padding: 40px 20px 100px;
    max-width: 1000px;
    margin: 0 auto;
}

.glass-card {
    width: 100%;
    background: var(--glass);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px;
    position: relative; 
}

.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.skills-grid span {
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 0.85rem;
    border: 1px solid var(--glass-border);
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.achievement-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    padding: 15px;
    text-align: center;
    transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.achievement-card:hover {
    transform: translateY(-10px);
    border-color: var(--gold);
    background: rgba(255, 255, 255, 0.07);
}

.achievement-card img {
    width: 100%;
    height: 160px;
    object-fit: contain; 
    background: rgba(0,0,0,0.2);
    border-radius: 12px;
    margin-bottom: 12px;
}

.achievement-card p {
    display: -webkit-box;
    -webkit-line-clamp: 2; 
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: normal; 
}

.btn-primary, .btn-secondary {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
    margin-right: 15px;
    margin-top: 20px;
}

.btn-primary {
    background: var(--gold);
    color: #000;
}

.btn-primary:hover {
    background: var(--gold-hover);
    transform: scale(1.05);
}

.btn-secondary {
    border: 1px solid var(--glass-border);
    color: #fff;
    background: var(--glass);
}

.btn-secondary:hover {
    border-color: var(--gold);
    color: var(--gold);
}

.fadeInUp {
    animation: fadeInUp 0.8s ease-out forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .hero-content {
        flex-direction: column; 
        text-align: center;    
        gap: 30px;          
    }

    .photo-wrapper {
        display: flex;
        justify-content: center;
        width: 100%;
    }

    .photo-wrapper img {
        width: 240px;          
        margin: 0 auto;      
    }

    .text-wrapper h1 {
        font-size: 2.2rem;   
    }

    .hero-btns {
        display: flex;
        flex-direction: column;  
        align-items: center;
        gap: 15px;
    }

    .btn-primary, .btn-secondary {
        margin: 0;             
        width: 100%;         
        max-width: 280px;
    }
}

