/* Базовые переменные и настройки */
:root {
    --bg-slate-900: #ffffff;
    --bg-card-hover: #fafafa;
    --text-slate-200: #000000;
    --text-slate-400: #59636e;
    --text-slate-500: #888888;
    --accent-teal: #000000;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-slate-900);
    color: var(--text-slate-400);
    font-family: 'Geist', sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    position: relative;
}

a {
    text-decoration: none;
    color: inherit;
    outline: none;
    transition: var(--transition);
}

button {
    outline: none;
}

a:focus, a:focus-visible, button:focus, button:focus-visible {
    outline: none;
}

a:hover {
    color: var(--accent-teal);
}

h1, h2, h3, h4, h5, h6, strong {
    color: var(--text-slate-200);
    font-weight: 700;
}

/* Layout Container */
.layout {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    gap: 40px;
    position: relative;
    z-index: 1;
}

/* Левая панель (Фиксированная) */
.left-panel {
    width: 40%;
    padding: 96px 0;
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.profile-avatar {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 24px;
}

.name {
    font-size: 1.8rem;
    font-weight: 600;
    letter-spacing: -0.025em;
    line-height: 1;
    margin-bottom: 5px;
}

.title {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 16px;
    color: #59636e;
}

.subtitle {
    max-width: 300px;
    margin-bottom: 60px;
}

/* Навигация */
.nav ul {
    list-style: none;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 12px 0;
    width: max-content;
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-slate-500);
}

.nav-indicator {
    display: inline-block;
    height: 1px;
    width: 30px;
    background-color: var(--text-slate-500);
    margin-right: 16px;
    transition: var(--transition);
}

.nav-link:hover .nav-indicator,
.nav-link.active .nav-indicator {
    width: 60px;
    background-color: var(--text-slate-200);
}

.nav-link:hover .nav-text,
.nav-link.active .nav-text {
    color: var(--text-slate-200);
}

/* Социальные иконки */
.socials {
    list-style: none;
    display: flex;
    gap: 20px;
    font-size: 1.5rem;
    margin-top: 32px;
}

.socials a {
    color: var(--text-slate-400);
}

.socials a:hover {
    color: var(--text-slate-200);
}

/* Правая панель (Скролл) */
.right-panel {
    width: 55%;
    padding: 96px 0;
}

.section {
    margin-bottom: 80px;
}

.sticky-header {
    display: none; /* Скрыто на десктопе */
}

/* Обо мне */
.about-text p {
    margin-bottom: 16px;
}
.about-text strong {
    font-weight: 500;
    color: var(--text-slate-200);
}
.about-text a {
    color: var(--text-slate-200);
    font-weight: 500;
    text-decoration: underline;
    text-decoration-color: transparent;
}
.about-text a:hover {
    color: var(--accent-teal);
    text-decoration-color: var(--accent-teal);
}

/* Стек технологий */
.skills-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-item {
    display: flex;
    align-items: center;
    gap: 6px;
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--accent-teal);
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.25rem;
}

/* Портфолио (Проекты) */
.projects-grid {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* Эффект затемнения остальных карточек при наведении на контейнер */
.projects-grid:hover .project-card {
    opacity: 0.4;
}

.project-card {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 20px;
    padding: 24px;
    border-radius: 12px;
    transition: var(--transition);
    cursor: pointer;
    border: 1px solid transparent;
}

/* Карточка при наведении */
.projects-grid .project-card:hover {
    opacity: 1 !important;
    background-color: var(--bg-card-hover);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    border-color: rgba(0,0,0,0.05);
}

.project-image-wrapper img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.project-card:hover .project-image-wrapper img {
    border-color: rgba(0, 0, 0, 0.1);
}

.project-header {
    margin-bottom: 8px;
}

.project-year {
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--text-slate-500);
}

.project-title {
    font-size: 1.125rem;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.project-title i {
    font-size: 0.8rem;
    transition: transform 0.2s ease;
}

.project-card:hover .project-title {
    color: var(--accent-teal);
}

.project-card:hover .project-title i {
    transform: translate(2px, -2px);
}

.project-description {
    font-size: 0.875rem;
    margin-bottom: 16px;
}

.project-tags {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.project-tags li {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--accent-teal);
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.25rem;
}

/* Обучение (Сертификаты) */
.education-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.education-list:hover .education-card {
    opacity: 0.4;
}

.education-card {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 20px;
    padding: 24px;
    border-radius: 12px;
    transition: var(--transition);
    cursor: pointer;
    border: 1px solid transparent;
}

.education-list .education-card:hover {
    opacity: 1 !important;
    background-color: var(--bg-card-hover);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    border-color: rgba(0,0,0,0.05);
}

.education-image-wrapper img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.education-card:hover .education-image-wrapper img {
    border-color: rgba(0, 0, 0, 0.1);
}

.education-year {
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--text-slate-500);
    padding-top: 4px;
}

.education-title {
    font-size: 1.125rem;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.education-title i {
    font-size: 0.8rem;
    transition: transform 0.2s ease;
}

.education-card:hover .education-title {
    color: var(--accent-teal);
}

.education-card:hover .education-title i {
    transform: translate(2px, -2px);
}

.education-issuer {
    color: var(--text-slate-200);
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.education-description {
    font-size: 0.875rem;
    color: var(--text-slate-400);
}

/* Футер */
.footer {
    text-align: center;
    padding: 40px 0;
    font-size: 0.875rem;
}

.footer a {
    color: var(--text-slate-200);
    text-decoration: underline;
    text-decoration-color: transparent;
}
.footer a:hover {
    color: var(--accent-teal);
    text-decoration-color: var(--accent-teal);
}

/* Адаптивность (Медиа-запросы) */
@media (max-width: 1024px) {
    .layout {
        flex-direction: column;
        padding: 0 48px;
        gap: 0;
    }

    .left-panel {
        width: 100%;
        position: relative;
        padding: 96px 0 48px;
        max-height: none;
        height: auto;
    }

    .subtitle {
        margin-bottom: 24px;
    }

    .nav {
        display: none; /* Скрываем навигацию на мобильных */
    }

    .right-panel {
        width: 100%;
        padding: 0 0 96px;
    }

    .section {
        margin-bottom: 48px;
    }

    .sticky-header {
        display: block;
        position: sticky;
        top: 0;
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(8px);
        padding: 16px 0;
        margin-bottom: 24px;
        z-index: 10;
        margin-top: -16px;
    }

    .sticky-header h2 {
        font-size: 1rem;
        text-transform: uppercase;
        letter-spacing: 0.1em;
    }
}

@media (max-width: 768px) {
    .layout {
        padding: 0 24px;
    }

    .left-panel {
        padding: 48px 0 32px;
    }

    .section {
        margin-bottom: 32px;
    }

    .name {
        font-size: 2.5rem;
    }

    .project-card, .education-card {
        grid-template-columns: 1fr;
        padding: 16px;
    }

    .project-image-wrapper, .education-image-wrapper {
        order: -1;
    }

    .project-image-wrapper img, .education-image-wrapper img {
        width: 100%;
        max-width: 200px;
    }
}
