/* === Переменные (Темы) === */
:root {
    /* Светлая тема */
    --bg-color: #f4f6f8;
    --card-bg: #ffffff;
    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --accent-color: #3182ce; /* Приятный синий */
    --accent-hover: #2b6cb0;
    --badge-bg: #c6f6d5;
    --badge-text: #22543d;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --transition-speed: 0.3s;
}

[data-theme="dark"] {
    /* Темная тема */
    --bg-color: #171923;
    --card-bg: #2d3748;
    --text-primary: #f7fafc;
    --text-secondary: #a0aec0;
    --accent-color: #63b3ed;
    --accent-hover: #4299e1;
    --badge-bg: #276749;
    --badge-text: #f0fff4;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
}

/* === Базовые стили === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

/* === Навигация === */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.logo {
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: -0.5px;
}

.controls {
    display: flex;
    gap: 1rem;
}

.btn-icon {
    background: none;
    border: 1px solid var(--text-secondary);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    background-color: var(--text-primary);
    color: var(--bg-color);
    border-color: var(--text-primary);
}

/* === Контент (Grid/Flex) === */
main {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem 4rem;
}

.section {
    margin-top: 4rem;
    opacity: 0; /* Для анимации появления */
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.section.visible {
    opacity: 1;
    transform: translateY(0);
}

.section-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    font-weight: 700;
}

/* === Hero Block === */
.hero {
    text-align: center;
    padding: 4rem 0;
    animation: fadeIn 0.8s ease-out forwards;
}

.photo-container {
    width: 150px;
    height: 150px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--accent-color);
    box-shadow: var(--shadow);
}

.profile-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.hero h2 {
    font-size: 1.25rem;
    color: var(--text-secondary);
    font-weight: 400;
    margin-bottom: 1rem;
}

.social-links {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.social-links a {
    color: var(--text-secondary);
    font-size: 1.5rem;
    transition: color 0.2s;
}

.social-links a:hover {
    color: var(--accent-color);
}

/* === Карточки === */
.card {
    background-color: var(--card-bg);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: background-color var(--transition-speed);
}

/* === Скиллы === */
.skills-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 600px) {
    .skills-container {
        grid-template-columns: 1fr 1fr;
    }
}

.skill-group h4 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

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

.tags span {
    background-color: var(--card-bg);
    border: 1px solid var(--text-secondary);
    color: var(--text-primary);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    opacity: 0.9;
    transition: transform 0.2s;
}

.tags span:hover {
    transform: translateY(-2px);
    border-color: var(--accent-color);
    color: var(--accent-color);
}

/* === Проекты === */
.projects-grid {
    display: grid;
    gap: 1.5rem;
}

.project-card {
    background-color: var(--card-bg);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    text-decoration: none;
    color: inherit;
    display: block;
    border: 1px solid transparent;
    transition: transform 0.2s, border-color 0.2s;
}

.link-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
    cursor: pointer;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
}

.project-title {
    font-size: 1.2rem;
    font-weight: 700;
}

.status-badge {
    background-color: var(--badge-bg);
    color: var(--badge-text);
    font-size: 0.7rem;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    text-transform: uppercase;
    font-weight: 700;
}

.project-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.project-tech {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--accent-color);
    font-weight: 600;
}

/* === Footer === */
footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* === Анимации === */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}