:root {
    --bg: #0b1120;
    --bg-soft: #111a2e;
    --surface: #16203a;
    --border: #24314f;
    --text: #e6edf7;
    --muted: #93a3bd;
    --accent: #4cc9f0;
    --accent-soft: rgba(76, 201, 240, 0.12);
    --radius: 14px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background:
        radial-gradient(900px 500px at 50% -100px, rgba(76, 201, 240, 0.10), transparent 70%),
        var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", system-ui, sans-serif;
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 780px;
    margin: 0 auto;
    padding: 56px 24px 80px;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ---- Переключатель языка ---- */

.lang-switch {
    display: flex;
    justify-content: flex-end;
    gap: 4px;
    margin-bottom: 20px;
}

.lang-btn {
    padding: 5px 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--muted);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.lang-btn:hover {
    color: var(--text);
    border-color: var(--accent);
}

.lang-btn.active {
    color: var(--accent);
    background: var(--accent-soft);
    border-color: var(--accent);
}

/* ---- Шапка ---- */

.hero {
    text-align: center;
    padding-bottom: 8px;
}

.avatar {
    width: 76px;
    height: 76px;
    margin: 0 auto 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--accent);
    background: var(--accent-soft);
    border: 1px solid var(--border);
}

.hero h1 {
    font-size: clamp(30px, 6vw, 42px);
    line-height: 1.15;
    margin: 0 0 8px;
    letter-spacing: -0.02em;
}

.tagline {
    margin: 0 0 6px;
    font-size: 18px;
    color: var(--text);
}

.meta {
    color: var(--muted);
    font-size: 14px;
    margin: 0;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin: 28px 0 8px;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-size: 15px;
    font-weight: 500;
    transition: transform 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
    text-decoration: none;
    transform: translateY(-1px);
    border-color: var(--accent);
}

.btn-primary {
    background: var(--accent);
    border-color: var(--accent);
    color: #06182a;
}

.nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    justify-content: center;
    margin: 28px 0 8px;
    font-size: 15px;
}

/* ---- Секции ---- */

.section {
    margin-top: 56px;
}

.section h2 {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--muted);
    font-weight: 600;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
    margin: 0 0 24px;
}

.section p {
    margin: 0 0 14px;
}

/* ---- Факты ---- */

.facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-top: 24px;
}

.fact {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    text-align: center;
}

.fact-value {
    font-size: 22px;
    font-weight: 600;
    color: var(--accent);
    line-height: 1.2;
}

.fact-label {
    font-size: 13px;
    color: var(--muted);
    margin-top: 4px;
}

/* ---- Карточки ---- */

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    margin-bottom: 16px;
}

.card-compact {
    padding: 16px 22px;
}

.card h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
}

.card-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 10px;
}

.org {
    margin: 0;
    color: var(--accent);
    font-weight: 500;
}

.org::before {
    content: "· ";
    color: var(--muted);
}

.summary {
    margin-top: 12px !important;
}

.card ul {
    margin: 0;
    padding-left: 20px;
    color: var(--text);
}

.card li {
    margin-bottom: 6px;
}

.card li::marker {
    color: var(--accent);
}

.stack {
    margin: 16px 0 0 !important;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    font-size: 13px;
    color: var(--muted);
}

.link-arrow {
    font-weight: 500;
}

/* ---- Навыки ---- */

.skill-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.skill-group h3 {
    margin: 0 0 10px;
    font-size: 15px;
    font-weight: 600;
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    font-size: 13px;
    color: var(--muted);
}

/* ---- Контакты ---- */

.contact-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.contact-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.contact-label {
    min-width: 90px;
    color: var(--muted);
    font-size: 14px;
}

footer {
    margin-top: 64px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    text-align: center;
}

@media (max-width: 520px) {
    .container {
        padding: 36px 18px 60px;
    }

    .card {
        padding: 18px;
    }

    .contact-label {
        min-width: 100%;
    }
}
