:root {
    --bg-dark: #0f0f10;
    --bg-card: #1a1a1d;
    --bg-lighter: #252529;
    --primary: #F0660A;
    --second: #FFB280;
    --primary-dark: #532707;
    --text-white: #ffffff;
    --text-gray: #a0a0a0;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
}

body {
    background-color: var(--bg-dark);
    color: var(--text-white);
    line-height: 1.6;
}
.card{
    padding: 10px;
}
.Background-hero{

}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 20px;            
    width: 90%;           
    max-width: 1200px;    
    
    /* Центрирование фиксированного элемента */
    left: 50%;
    transform: translateX(-50%); 
    
    background: rgba(15, 15, 16, 0.5); /* Чуть больше прозрачности для стиля */
    backdrop-filter: blur(12px);
    padding: 10px 0;      /* Уменьшил вертикальные отступы для компактности */
    z-index: 1000;
    border: 1px solid rgba(255, 255, 255, 0.1); /* Тонкая светлая граница вместо просто #333 */
    border-radius: 20px;
}


.nav-container {
    display: flex;
    align-items: center;
    width: 100%;

}
.logo {
    flex: 0 0 auto; /* не растягиваем логотип */
    font-family: 'Rubik Mono One', sans-serif;
    font-size: 1.2rem; 
    font-weight: 400; 
    text-transform: uppercase;
    display: flex;
    color: var(--primary);
    align-items: center;
}

.logo span {
    font-family: 'Indie Flower', cursive !important;
    font-size: 1.8rem; 
    color: var(--second);
    font-weight: 700;
    position: relative;
    left: -20px;
    top: 20px;    
    text-transform: none; 
}
.contact-container{
    display: flexbox;
    justify-items: center;
    
}
.nav-links {
    & .selector{
        border: 1px solid var(--primary-dark);
        color: var(--primary-dark);
        padding: 8px 20px;
        border-radius: 10px;
        background-color: transparent; /* Убрал темный фон по умолчанию */
    };
    & .active{
        border-color: var(--primary);
        color: var(--primary);
    }
    
    display: flex;
    gap: 50px;             /* расстояние между ссылками */
    flex: 1;               /* растягиваем на всю доступную ширину */
    justify-content: center; /* центрируем сами ссылки */
    
}

.nav-links a {
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover { color: var(--primary); }

.btn-nav {
    
    flex: 0 1 auto; 
    border: 3px solid var(--primary);
    padding: 8px 20px;
    border-radius: 10px;
    background-color: transparent; /* Убрал темный фон по умолчанию */
    color: var(--primary) !important;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease; /* Явно указали что анимировать */
    vertical-align: middle;

    backface-visibility: hidden; /* Убирает микро-мерцание пикселей */
}

.btn-nav:hover {
    background-color: var(--primary);
    color: #ffffff !important; /* Белый текст на оранжевом фоне читается лучше и не мерцает */
}



.burger { display: none; font-size: 1.5rem; cursor: pointer; }

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 80px;
    
}
.hero::after {
    content: "";
    position: absolute;
    bottom: -20px;
    left: 0;
    width: 100%;
    height: 200px; /* регулируй высоту перехода */
    background: linear-gradient(
        to bottom,
        rgba(15, 15, 16, 0) 0%,
        var(--bg-dark) 100%
    );
    pointer-events: none;
    z-index: 3;
}
.background-hero div:hover {
    background: rgba(240, 102, 10, 0.25);
    box-shadow: 
        0 0 15px rgba(240, 102, 10, 0.4),
        0 0 30px rgba(240, 102, 10, 0.2);
}
.background-hero {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: repeat(6, 1fr);
    z-index: 0;
    background-color: linear-gradient(to bottom, black, transparent);
}

.background-hero div {
    border: 1px solid rgba(255, 255, 255, 0.03);
    transition: 0.3s ease;
    
}
.hero-content {
    position: relative;
    z-index: 2;
    pointer-events: none;
}

.hero-content a,
.hero-content button {
    pointer-events: auto;
}
.greeting {
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.hero h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 20px;
}

.text-highlight {
    background: linear-gradient(to right, var(--primary), #ff9e42);
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-desc {
    max-width: 600px;
    margin: 0 auto 40px;
    color: var(--text-gray);
    font-size: 1.1rem;
}

.hero-btns {
    display: flex;
    gap: 20px;
    justify-content: center;
}

/* Для остальных кнопок в Hero */
.btn {
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-size: 1rem;
    transition: filter 0.3s ease, transform 0.2s ease, background-color 0.3s ease;
    /* Убираем возможные дергания текста */
    -webkit-font-smoothing: antialiased;
    transform: translateZ(0); 
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover { background: var(--primary-dark); }

.btn-outline {
    border: 2px solid #333;
    background: transparent;
    color: var(--text-white);
}

.btn-outline:hover { border-color: var(--primary); color: var(--primary); }

/* Sections General */
.section { padding: 100px 0; }
.bg-darker { background: #0a0a0a; }

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 60px;
    position: relative;

    transform: translateX(-50%);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60%;
    height: 4px;
    background: var(--primary);
    left: 20%;
}

/* Skills Grid */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.skill-card {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 15px;
    border: 1px solid #333;
    transition: var(--transition);
}

.skill-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
}

.skill-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.skill-card h3 { margin-bottom: 10px; font-size: 1.5rem; }
.skill-card p { color: var(--text-gray); margin-bottom: 20px; }

.tags span {
    display: inline-block;
    background: rgba(255, 107, 0, 0.1);
    color: var(--primary);
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-right: 5px;
    margin-bottom: 5px;
}

/* Projects Section */
.project-filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    background: var(--bg-lighter);
    color: var(--text-gray);
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn.active, .filter-btn:hover {
    background: var(--primary);
    color: white;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.project-card {
    background: var(--bg-card);
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid #333;
    transition: var(--transition);
    /* Для анимации скрытия/показа */
    opacity: 1;
    transform: scale(1);
}

.project-card.hide {
    display: none;
}

.project-img {
    height: 180px;
    background: linear-gradient(45deg, #252529, #1a1a1d);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: #444;
}

.project-img i { transition: var(--transition); }
.project-card:hover .project-img i { color: var(--primary); transform: scale(1.1); }

.project-info { padding: 25px; }
.project-info h3 { margin-bottom: 10px; }
.project-info p { color: var(--text-gray); font-size: 0.9rem; margin-bottom: 15px; }

.project-tech { margin-bottom: 20px; }
.project-tech span {
    font-size: 0.75rem;
    color: #ccc;
    border: 1px solid #444;
    padding: 2px 8px;
    border-radius: 4px;
    margin-right: 5px;
}

.project-links a {
    font-size: 0.9rem;
    margin-right: 15px;
    font-weight: 600;
}
.project-links a:hover { color: var(--primary); }

/* Contacts */
.social-links-large {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 40px;
}

.social-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px;
    min-width: 120px;
    background: var(--bg-lighter);
    border-radius: 10px;
    transition: var(--transition);
}

.social-box i { font-size: 2rem; color: var(--primary); }

.social-box:hover {
    background: var(--primary);
    transform: translateY(-5px);
}
.social-box:hover i, .social-box:hover span { color: white; }

footer {
    text-align: center;
    padding: 30px;
    color: var(--text-gray);
    font-size: 0.9rem;
    border-top: 1px solid #333;
}

/* Анимация появления */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile */
@media (max-width: 790px) {
    .nav-links { display: none; }
    .hero h1 { font-size: 2.5rem; }
    .social-links-large { flex-direction: column; align-items: stretch; }
    .burger { display: block; }
}