:root {
    --bg: #f7f8fa;
    --text: #23272f;
    --muted: #555c6b;
    --accent: #1a56db;
    --border: #e1e5ea;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family:
        system-ui,
        -apple-system,
        "Segoe UI",
        Roboto,
        Arial,
        sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    overflow-wrap: break-word;
}

.container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Шапка / Hero */
.hero {
    padding: 40px 0 32px;
    border-bottom: 1px solid var(--border);
}

.nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    margin-bottom: 28px;
}

.nav a {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 2px 0;
}

.nav a:hover {
    text-decoration: underline;
}

.hero-role {
    color: var(--accent);
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    margin-bottom: 8px;
}

.hero h1 {
    font-size: 2.2rem;
    line-height: 1.2;
    font-weight: 700;
    margin-bottom: 16px;
}

.contacts {
    font-style: normal;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    color: var(--muted);
}

.contacts a {
    color: var(--accent);
    text-decoration: none;
}

.contacts a:hover {
    text-decoration: underline;
}

/* Секции */
.section {
    padding: 36px 0;
    border-bottom: 1px solid var(--border);
}

.section:last-of-type {
    border-bottom: none;
}

h2 {
    font-size: 1.5rem;
    line-height: 1.25;
    font-weight: 700;
    padding-bottom: 8px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--accent);
}

/* Списки */
.profile-list,
.projects,
.job-list,
.job-list ul {
    list-style: none;
}

.profile-list li,
.projects li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 10px;
}

.profile-list li::before,
.projects li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 1px;
}

.skills {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 32px;
}

.skills li {
    position: relative;
    padding-left: 20px;
}

.skills li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 1px;
}

.skills strong,
.projects strong,
.job-list strong {
    font-weight: 600;
}

/* Опыт работы */
.job-header {
    margin-bottom: 16px;
}

.job-header h3 {
    font-size: 1.2rem;
    line-height: 1.3;
    font-weight: 700;
    margin-bottom: 4px;
}

.job-meta {
    color: var(--muted);
    font-size: 0.95rem;
}

.job-list > li {
    margin-bottom: 18px;
}

.job-list > li > strong {
    display: block;
    margin-bottom: 6px;
}

.job-list ul li {
    position: relative;
    padding-left: 18px;
    margin-bottom: 6px;
}

.job-list ul li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 5px;
    height: 5px;
    background: var(--accent);
    border-radius: 1px;
}

/* Подвал */
.footer {
    padding: 28px 0;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.9rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px 24px;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.footer-name {
    color: var(--text);
    font-weight: 600;
}

.footer-role {
    color: var(--muted);
}

.footer-contacts a {
    color: var(--accent);
    text-decoration: none;
}

.footer-contacts a:hover {
    text-decoration: underline;
}

.footer-meta {
    text-align: right;
}

.footer-bottom {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    font-size: 0.85rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.back-to-top {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
}

.back-to-top:hover {
    text-decoration: underline;
}

/* Доступность */
a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 2px;
}

/* Адаптивность */
@media (max-width: 720px) {
    .hero h1 {
        font-size: 1.75rem;
    }

    .skills {
        grid-template-columns: 1fr;
    }

    .contacts {
        flex-direction: column;
        gap: 6px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-meta {
        text-align: left;
    }
}

/* Печать */
@media print {
    .nav,
    .back-to-top {
        display: none;
    }

    body {
        background: #fff;
        color: #000;
        font-size: 12pt;
    }

    .hero,
    .section,
    .footer,
    .footer-bottom {
        border-color: #ccc;
    }

    .section {
        page-break-inside: avoid;
    }

    a {
        color: #000;
        text-decoration: none;
    }
}
