/* Основные стили */
:root {
    --primary: #cc7832;
    --primary-light: rgba(204, 120, 50, 0.1);
    --secondary: #ffc66d;
    --text: #d4d4d4;
    --text-light: #a0a0a0;
    --bg: #1e1e1e;
    --bg-light: #252526;
    --bg-lighter: #2d2d2d;
    --border: #3c3c3c;
    --python: #3776ab;
    --web: #5865F2;
    --tools: #FF6B6B;
    --os: #b9b9b9;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    flex: 1;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.container.loaded {
    opacity: 1;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

/* Шапка */
header {
    background: var(--bg-light);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid var(--border);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

h1 {
    color: var(--primary);
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.tagline {
    color: var(--text-light);
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

/* Навигация */
.main-nav ul {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

.main-nav a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.main-nav a:hover, .main-nav a.active {
    color: var(--primary);
    background: var(--primary-light);
}

.main-nav i {
    font-size: 1rem;
}

/* Секции */
.section {
    margin-bottom: 3rem;
    padding-top: 2rem;
}

.section-title {
    color: var(--secondary);
    font-size: 1.8rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.section-title i {
    font-size: 1.5rem;
}

/* Проекты */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.featured-project {
    grid-column: 1 / -1;
}

.project-card {
    background: var(--bg-lighter);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.project-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.project-card.large {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    border-color: var(--primary);
}

.project-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--primary);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

.project-header {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid var(--border);
}

.project-icon {
    font-size: 2rem;
    color: var(--primary);
}

.project-card h3 {
    color: var(--secondary);
    font-size: 1.3rem;
    margin: 0;
}

.project-content {
    padding: 1.5rem;
}

.project-content p {
    margin-bottom: 1.5rem;
    color: var(--text-light);
}

.project-stats {
    display: flex;
    gap: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

.project-stats i {
    margin-right: 0.5rem;
    color: var(--primary);
}

.project-footer {
    padding: 1rem 1.5rem;
    background: rgba(0, 0, 0, 0.1);
    border-top: 1px solid var(--border);
}

.project-link {
    color: var(--primary);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.project-card:hover .project-link {
    color: var(--secondary);
}

/* Бейджи сложности */
.difficulty-badge {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.difficulty-badge.beginner {
    background: rgba(0, 128, 0, 0.2);
    color: #7cfc00;
}

.difficulty-badge.intermediate {
    background: rgba(255, 165, 0, 0.2);
    color: #ffa500;
}

.difficulty-badge.advanced {
    background: rgba(255, 0, 0, 0.2);
    color: #ff4500;
}

/* Статьи */
.articles-tabs {
    background: var(--bg-light);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.tab-header {
    display: flex;
    border-bottom: 1px solid var(--border);
}

.tab-btn {
    padding: 1rem 1.5rem;
    background: none;
    border: none;
    color: var(--text);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.tab-btn.active {
    color: var(--primary);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary);
}

.tab-content {
    display: none;
    padding: 1.5rem;
}

.tab-content.active {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.tab-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
}

.tab-empty i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.article-card {
    background: var(--bg-lighter);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.article-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.article-image {
    height: 150px;
    background-size: cover;
    background-position: center;
}

.article-body {
    padding: 1.5rem;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-size: 0.8rem;
}

.article-category {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-weight: 500;
}

.article-category.python {
    background: rgba(55, 118, 171, 0.2);
    color: #3776ab;
}

.article-category.web {
    background: rgba(88, 101, 242, 0.2);
    color: #5865F2;
}

.article-category.tools {
    background: rgba(255, 107, 107, 0.2);
    color: #FF6B6B;
}

.article-date {
    color: var(--text-light);
}

.article-title {
    color: var(--secondary);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.article-excerpt {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.article-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.article-card:hover .article-link {
    color: var(--secondary);
}

#python .article-card {
    background: var(--bg-lighter);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

#python .article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

#python .article-image {
    height: 150px;
    background-size: cover;
    background-position: center;
}

#python .article-body {
    padding: 1.5rem;
}

#python .article-category.python {
    background: rgba(55, 118, 171, 0.2);
    color: #3776ab;
}

#tools .article-card {
    background: var(--bg-lighter);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

#tools .article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

#tools .article-image {
    height: 150px;
    background-size: cover;
    background-position: center;
}

#tools .article-body {
    padding: 1.5rem;
}

#tools .article-category.tools {
    background: rgba(255, 107, 107, 0.2);
    color: #FF6B6B;
}

.article-category.os {
    background: rgba(0, 0, 0, 0.2);
    color: var(--os);
}

#os .article-card {
    background: var(--bg-lighter);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

#os .article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

#os .article-image {
    height: 150px;
    background-size: cover;
    background-position: center;
}

#os .article-body {
    padding: 1.5rem;
}

#os .article-category.os {
    background: rgb(20, 20, 20);
    color: var(--os);
}

/* Обо мне */
.about-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    align-items: center;
}

.about-image {
    display: flex;
    justify-content: center;
}

.image-placeholder {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    color: var(--primary);
}

.profile-image {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary);
    box-shadow: 0 5px 15px #13131394;
    transition: all 0.3s ease;
}

.profile-image:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border-color: var(--secondary);
}

.about-text h3 {
    color: var(--secondary);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.about-text p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

.skills h4 {
    color: var(--secondary);
    margin: 1.5rem 0 1rem;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-tag {
    background: var(--primary-light);
    color: var(--primary);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
}

/* Футер */
footer {
    background: var(--bg-light);
    color: var(--text-light);
    padding: 3rem 0 0;
    margin-top: 3rem;
    border-top: 1px solid var(--border);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section h3 {
    color: var(--secondary);
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.footer-section p {
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.contact-info p {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-link {
    color: var(--text-light);
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.social-link:hover {
    color: var(--primary);
}

.subscribe-form {
    display: flex;
    margin-top: 1rem;
}

.subscribe-form input {
    flex: 1;
    padding: 0.5rem 1rem;
    background: var(--bg-lighter);
    border: 1px solid var(--border);
    border-radius: 5px 0 0 5px;
    color: var(--text);
}

.subscribe-form button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0 1rem;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.subscribe-form button:hover {
    background: var(--secondary);
}

.footer-bottom {
    text-align: center;
    padding: 1.5rem;
    margin-top: 2rem;
    border-top: 1px solid var(--border);
    font-size: 0.8rem;
}

/* Адаптивность */
@media (max-width: 768px) {
    .project-card.large {
        grid-template-columns: 1fr;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .skill-tags {
        justify-content: center;
    }
    
    .tab-header {
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }
    
    .tab-header::-webkit-scrollbar {
        height: 5px;
    }
    
    .tab-header::-webkit-scrollbar-thumb {
        background: var(--primary);
        border-radius: 5px;
    }
}

@media (max-width: 480px) {
    .main-nav ul {
        gap: 0.5rem;
    }
    
    .main-nav a {
        padding: 0.5rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .project-card, .article-card {
        opacity: 1;
        transform: none;
    }
}