/* Общие настройки */

html {
    scroll-behavior:smooth;
}

body {
    margin: 0;
    font-family: 'Arial', sans-serif;
    background: #111;
    color: #fff;
    text-align: center;
}

header {
    background: #222;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

header nav a {
    color: #fff;
    text-decoration: none;
    margin: 0 20px;
    font-weight: 600;
    transition: 0.3s;
}

header nav a:hover {
    color: #ff7f50;
}

/* Hero секция */
.hero {
    padding: 80px 20px 50px 20px;
}

.title {
    font-size: 3rem;
    font-weight: 900;
    background: linear-gradient(90deg, #ff0000, #ff7f00, #ffff00, #00ff00, #00ffff, #0000ff, #8b00ff);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    animation: rainbow 6s linear infinite;
    margin-bottom: 20px;
}

@keyframes rainbow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

section {
    margin: 50px auto;
    max-width: 900px;
    padding: 0 20px;
    scroll-margin-top: 80px;
}

h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #ff7f50;
}

/* Скиллы */
.skills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.skills span {
    background: #333;
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 600;
    transition: 0.3s;
}

.skills span:hover {
    background: #555;
}


.skills-header{
    position: relative;
    margin-bottom: 20px;
    min-height: 44px; /* чтобы метка не "наезжала" */
    display: flex;
    align-items: center;
    justify-content: center; /* h2 по центру */
}

.skills-header h2{
    margin: 0; /* убираем дефолтные отступы */
}

/* Метка "Изучается" — строго справа */
.learning-label{
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}

.learning-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    color: rgba(255,255,255,0.7);
    white-space: nowrap;
}

.learning-icon {
    width: 18px;
    height: 18px;
    border-radius: 6px;
    background: repeating-linear-gradient(
        45deg,
        rgba(255,255,255,0.28),
        rgba(255,255,255,0.28) 3px,
        transparent 3px,
        transparent 7px
    );
    border: 1px solid rgba(255,255,255,0.12);
}

/* ===== "Изучается" chips (Terraform, Kubernetes) ===== */

.skills span.learning {
    position: relative;
    opacity: 0.65;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.12);
}

.skills span.learning::after {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        45deg,
        rgba(255,255,255,0.16),
        rgba(255,255,255,0.16) 4px,
        transparent 4px,
        transparent 9px
    );
    pointer-events: none;
}

/* Чтобы hover не "съедал" смысл (оставляем полоски) */
.skills span.learning:hover {
    background: #444;
}

/* Адаптация шапки skills для мобилок */
@media (max-width: 480px){
    .skills-header{
        min-height: unset;
        flex-direction: column;
        gap: 10px;
    }

    .learning-label{
        position: static;
        transform: none;
    }
}


/* Проекты */

.project-card {
    display: grid;
    grid-template-columns: 1fr 80px; /* текст + иконка */
    align-items: center;
    background: #222;
    padding: 20px;
    margin: 15px 0;
    border-radius: 12px;
    transition: 0.3s;
}

.project-card:hover {
    background: #333;
    transform: translateY(-5px);
}

.project-link {
    display: flex;
    justify-content: center;
    align-items: center;
}

.project-link img.git-icon {
    width: 40px;
    height: 40px;
    transition: 0.3s;
    opacity: 0.85;
}

.project-link img.git-icon:hover {
    opacity: 1;
    transform: scale(1.2);
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
    .project-card {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px;
        margin: 15px auto;
    }
    
    .project-content {
        padding-right: 0;
        text-align: center;
    }
    
    .project-content h3 {
        font-size: 1.3rem;
        margin-bottom: 12px;
    }
    
    .project-content p {
        font-size: 0.95rem;
        line-height: 1.4;
    }
    
    .project-link {
        justify-content: center;
        padding: 0;
    }
    
    .project-link img.git-icon {
        width: 32px;
        height: 32px;
    }
    
    /* Также обновим другие секции для лучшей адаптации */
    section {
        padding: 0 15px;
    }
    
    .title {
        font-size: 2.2rem;
    }
    
    h2 {
        font-size: 1.8rem;
    }
    
    .skills span {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
}

/* Еще более узкие экраны */
@media (max-width: 480px) {
    .project-card {
        padding: 18px;
    }
    
    .project-content h3 {
        font-size: 1.2rem;
    }
    
    .project-content p {
        font-size: 0.9rem;
    }
    
    header nav a {
        margin: 0 10px;
        font-size: 0.9rem;
    }
}

/* Контакты */
a {
    color: #ff7f50;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Footer */
footer {
    margin-top: 60px;
    padding: 20px;
    background: #222;
    opacity: 0.8;
}


