:root {
    --bg-main: #050711;
    --bg-alt: #0d111f;
    --bg-card: #101624;
    --accent: #ff1744;
    --accent-soft: rgba(255, 23, 68, 0.14);
    --text-main: #f5f5f5;
    --text-muted: #9ca3af;
    --border-subtle: #1f2937;
    --shadow-soft: 0 24px 60px rgba(0, 0, 0, 0.65);
    --radius-card: 16px;
    --transition-fast: 0.2s ease-out;
    --max-width: 1120px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(255, 23, 68, 0.14), transparent 55%),
        radial-gradient(circle at bottom right, rgba(239, 68, 68, 0.12), transparent 55%),
        var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

.page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ---------- Лейаут ---------- */

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 16px;
}

header {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(18px);
    background: linear-gradient(to bottom,
        rgba(5, 7, 17, 0.95),
        rgba(5, 7, 17, 0.82),
        transparent
    );
    border-bottom: 1px solid rgba(31, 41, 55, 0.7);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0;
}

.logo {
    font-weight: 700;
    letter-spacing: 0.12em;
    font-size: 14px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--accent);
    box-shadow: 0 0 18px rgba(255, 23, 68, 0.8);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 22px;
    font-size: 14px;
    color: var(--text-muted);
}

.nav-link {
    position: relative;
    cursor: pointer;
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 0;
    height: 2px;
    background: var(--accent);
    border-radius: 999px;
    transition: width var(--transition-fast);
}

.nav-link:hover {
    color: #e5e7eb;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-cta {
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(248, 113, 113, 0.7);
    background: rgba(248, 113, 113, 0.08);
    font-size: 13px;
}

main {
    flex: 1;
    padding-bottom: 56px;
}

section {
    padding: 40px 0;
}

.section-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 10px;
}

.section-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    max-width: 560px;
}

/* ---------- HERO ---------- */

.hero {
    padding-top: 40px;
    padding-bottom: 32px;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.2fr);
    gap: 32px;
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(75, 85, 99, 0.8);
    background: rgba(15, 23, 42, 0.9);
    margin-bottom: 14px;
}

.hero-badge span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: #22c55e;
    box-shadow: 0 0 12px rgba(34, 197, 94, 0.9);
}

.hero-title {
    font-size: clamp(30px, 4vw, 40px);
    font-weight: 700;
    margin-bottom: 10px;
}

.hero-title span {
    color: var(--accent);
}

.hero-subtitle {
    font-size: 15px;
    color: var(--text-muted);
    max-width: 620px;
    margin-bottom: 22px;
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.tag {
    font-size: 11px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(17, 24, 39, 0.9);
    border: 1px solid rgba(75, 85, 99, 0.9);
    color: var(--text-muted);
}

.tag-strong {
    border-color: rgba(248, 113, 113, 0.9);
    background: var(--accent-soft);
    color: #fecaca;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    padding: 9px 18px;
    border-radius: 999px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.btn-primary {
    background: var(--accent);
    color: #0b0f19;
    font-weight: 600;
    box-shadow: 0 18px 40px rgba(248, 113, 113, 0.55);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 24px 60px rgba(248, 113, 113, 0.7);
}

.btn-ghost {
    border-color: rgba(75, 85, 99, 0.9);
    background: rgba(15, 23, 42, 0.95);
    color: var(--text-muted);
}

.btn-ghost:hover {
    border-color: rgba(148, 163, 184, 0.9);
    color: #e5e7eb;
}

.hero-right {
    display: grid;
    gap: 14px;
}

.hero-card {
    background: rgba(15, 23, 42, 0.96);
    border-radius: var(--radius-card);
    padding: 16px 18px;
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-soft);
    position: relative;
    overflow: hidden;
}

.hero-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right,
        rgba(248, 113, 113, 0.22),
        transparent 60%);
    opacity: 0.8;
    pointer-events: none;
}

.hc-title {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.hc-main {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 10px;
}

.hc-main span:first-child {
    font-size: 16px;
    font-weight: 600;
}

.hc-main span:last-child {
    font-size: 12px;
    color: #fecaca;
}

.hc-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 11px;
    color: var(--text-muted);
}

.hc-tag {
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(55, 65, 81, 0.9);
}

/* ---------- Направления ---------- */

.tracks-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 24px;
}

.track-card {
    background: rgba(15, 23, 42, 0.95);
    border-radius: var(--radius-card);
    padding: 16px 16px 14px;
    border: 1px solid var(--border-subtle);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.track-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top left,
        rgba(248, 113, 113, 0.16),
        transparent 65%);
    opacity: 0;
    transition: opacity var(--transition-fast);
    pointer-events: none;
}

.track-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-soft);
    border-color: rgba(248, 113, 113, 0.7);
}

.track-card:hover::before {
    opacity: 1;
}

.track-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.track-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 6px;
}

.track-text {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.track-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.chip {
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(55, 65, 81, 0.9);
    color: var(--text-muted);
}

/* ---------- Навыки ---------- */

.skills-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 24px;
    margin-top: 22px;
}

.skill-group {
    background: rgba(15, 23, 42, 0.95);
    border-radius: var(--radius-card);
    border: 1px solid var(--border-subtle);
    padding: 16px 18px 14px;
}

.skill-group + .skill-group {
    margin-top: 12px;
}

.skill-group-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.skill-group-sub {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.skill-tag {
    font-size: 11px;
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(55, 65, 81, 0.9);
    color: #e5e7eb;
}

.skill-tag.hot {
    border-color: rgba(248, 113, 113, 0.9);
    background: var(--accent-soft);
    color: #fecaca;
}

.skill-note-card {
    background: rgba(15, 23, 42, 0.98);
    border-radius: var(--radius-card);
    border: 1px solid rgba(248, 113, 113, 0.7);
    padding: 16px 18px;
    box-shadow: var(--shadow-soft);
    font-size: 13px;
    color: var(--text-muted);
}

.skill-note-card strong {
    color: #fee2e2;
}

/* ---------- Опыт ---------- */

.timeline {
    margin-top: 22px;
    border-left: 1px solid rgba(55, 65, 81, 0.9);
    padding-left: 18px;
}

.tl-item {
    position: relative;
    margin-bottom: 20px;
}

.tl-item:last-child {
    margin-bottom: 6px;
}

.tl-dot {
    position: absolute;
    left: -9px;
    top: 3px;
    width: 12px;
    height: 12px;
    border-radius: 999px;
    border: 2px solid var(--bg-main);
    background: var(--accent);
    box-shadow: 0 0 14px rgba(248, 113, 113, 0.9);
}

.tl-role {
    font-size: 14px;
    font-weight: 600;
}

.tl-meta {
    font-size: 12px;
    color: #fecaca;
    margin: 2px 0 4px;
}

.tl-company {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.tl-text {
    font-size: 13px;
    color: var(--text-muted);
}

/* ---------- Проекты ---------- */

.projects-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 20px;
    margin-top: 22px;
}

.project-card {
    background: rgba(15, 23, 42, 0.97);
    border-radius: var(--radius-card);
    border: 1px solid var(--border-subtle);
    padding: 16px 18px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

.project-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right,
        rgba(248, 113, 113, 0.22),
        transparent 65%);
    opacity: 0.8;
    pointer-events: none;
}

.project-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.project-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.project-text {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.project-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.meta-pill {
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(55, 65, 81, 0.9);
    color: #e5e7eb;
}

/* ---------- Контакты / футер ---------- */

.contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    gap: 20px;
    margin-top: 22px;
}

.contact-card {
    background: rgba(15, 23, 42, 0.95);
    border-radius: var(--radius-card);
    border: 1px solid var(--border-subtle);
    padding: 16px 18px;
    font-size: 13px;
    color: var(--text-muted);
}

.contact-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.contact-label {
    font-size: 12px;
    color: #9ca3af;
}

.contact-value {
    font-size: 13px;
}

footer {
    border-top: 1px solid rgba(31, 41, 55, 0.9);
    padding: 14px 0 18px;
    margin-top: 20px;
    font-size: 12px;
    color: var(--text-muted);
}

/* ---------- Фото профиля ---------- */

.hero-photo-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
}

/* увеличено с 120px до 150px */
.profile-photo {
    width: 150px;
    height: 150px;
    border-radius: 999px;
    border: 2px solid var(--accent);
    overflow: hidden;
    box-shadow: 0 0 30px rgba(248, 113, 113, 0.55);
    background:
        radial-gradient(circle at top, rgba(248, 113, 113, 0.3), transparent 60%),
        #020617;
}

.profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.profile-caption {
    font-size: 12px;
    color: var(--text-muted);
}

/* ---------- Language switcher ---------- */

.lang-switch {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
}

.lang-btn {
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(75, 85, 99, 0.9);
    background: rgba(15, 23, 42, 0.95);
    color: var(--text-muted);
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
}

.lang-btn:hover {
    border-color: rgba(148, 163, 184, 0.9);
    color: #e5e7eb;
    transform: translateY(-1px);
}

.lang-btn.lang-active {
    border-color: rgba(248, 113, 113, 0.9);
    background: var(--accent-soft);
    color: #fecaca;
}

/* ---------- Кнопка печати (экран) ---------- */

.print-btn {
    /* базовые стили, если захочешь переопределить inline-стили */
}

/* ---------- Адаптив ---------- */

@media (max-width: 960px) {
    .hero-grid,
    .skills-layout,
    .projects-grid,
    .contact-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .hero-right {
        order: -1;
    }

    .tracks-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .nav-links {
        display: none;
    }
}

@media (max-width: 640px) {
    .hero {
        padding-top: 28px;
    }

    section {
        padding: 28px 0;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    /* на мобильных чуть меньше, чтобы не забирало весь экран */
    .profile-photo {
        width: 130px;
        height: 130px;
    }
}
