/* ===== CSS Variables (bijobs.ru palette) ===== */
:root {
    --primary: #3182CE;
    --primary-light: #63b3ed;
    --primary-dark: #2563a0;
    --bg-dark: #0a0a0a;
    --bg-section: #0f0f0f;
    --bg-card: #151515;
    --bg-card-hover: #1a1a1a;
    --border-color: #222222;
    --border-light: #2a2a2a;
    --text-primary: #f0ece8;
    --text-secondary: #999999;
    --text-muted: #555555;
    --font: 'Raleway', -apple-system, BlinkMacSystemFont, sans-serif;
    --radius: 12px;
    --radius-lg: 20px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --sidebar-width: 500px;
    --side-nav-width: 56px;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--bg-dark);
    color: var(--text-primary);
    font-size: 16px;
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

ul {
    list-style: none;
}

.accent {
    color: var(--primary);
}

.accent-link {
    color: var(--primary);
    transition: var(--transition);
    border-bottom: 1px solid transparent;
}

.accent-link:hover {
    border-bottom-color: var(--primary);
}

.text-muted {
    color: var(--text-secondary);
    font-size: 0.55em;
    font-weight: 500;
    letter-spacing: 1px;
}

/* ===== Reading Progress Bar ===== */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    width: 0%;
    z-index: 1001;
    transition: width 0.1s linear;
}

/* ===== Main Layout ===== */
.layout {
    display: flex;
    min-height: 100vh;
}

/* ===== LEFT: Sticky Sidebar ===== */
.sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
    padding: 24px 24px 24px 48px;
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card {
    width: 100%;
    max-height: calc(100vh - 48px);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.card__photo {
    width: 100%;
    aspect-ratio: 3 / 3.5;
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 20px;
    border: 2px solid var(--border-color);
    position: relative;
}

.card__photo-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 30% 20%, rgba(49, 130, 206, 0.35) 0%, transparent 60%),
        radial-gradient(ellipse at 70% 80%, rgba(99, 179, 237, 0.2) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(108, 99, 255, 0.15) 0%, transparent 70%),
        linear-gradient(160deg, #0d1117 0%, #111827 40%, #0c1322 100%);
    z-index: 0;
}

.card__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    position: relative;
    z-index: 1;
}

.card__info {
    margin-bottom: 16px;
}

.card__name {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 6px;
    line-height: 1.2;
}

.card__role {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    line-height: 1.4;
}

.card__location {
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.card__socials {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.card__social {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: var(--transition);
}

.card__social:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(49, 130, 206, 0.08);
    transform: translateY(-2px);
}

.card__cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 16px 20px;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-family: var(--font);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    transition: var(--transition);
    cursor: pointer;
}

.card__cta:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(49, 130, 206, 0.06);
}

.card__cta svg {
    width: 32px;
    height: 32px;
    padding: 6px;
    border-radius: 50%;
    border: none;
    background: #fff;
    color: var(--bg-dark);
    transition: var(--transition);
}

.card__cta:hover svg {
    background: var(--primary);
    color: #fff;
}

/* ===== RIGHT: Scrollable Content ===== */
.content {
    flex: 1;
    min-width: 0;
    max-width: 900px;
    padding: 40px 60px 40px 48px;
    margin: 0 auto;
}

/* ===== Right-side Vertical Nav (like Jayden) ===== */
.side-nav {
    position: fixed;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    z-index: 100;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 8px 4px;
}

.side-nav__link {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: var(--transition);
    position: relative;
}

.side-nav__link:hover,
.side-nav__link.active {
    color: var(--text-primary);
    background: var(--bg-card-hover);
}

.side-nav__link.active {
    color: var(--primary);
    background: rgba(49, 130, 206, 0.1);
}

.side-nav__link::before {
    content: attr(data-tooltip);
    position: absolute;
    right: calc(100% + 8px);
    padding: 6px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transform: translateX(4px);
    transition: var(--transition);
    pointer-events: none;
}

.side-nav__link:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

/* ===== Sections ===== */
.section {
    padding: 60px 0;
    border-bottom: 1px solid var(--border-color);
}

.section--intro {
    padding-top: 20px;
    min-height: calc(100vh - 80px);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.section:last-of-type {
    border-bottom: none;
}

.section-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-label::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
}

.section-title {
    font-size: clamp(28px, 3vw, 40px);
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 36px;
    line-height: 1.15;
}

.section-hero-title {
    font-size: clamp(36px, 4vw, 56px);
    font-weight: 800;
    letter-spacing: -1.5px;
    line-height: 1.1;
    margin-bottom: 20px;
}

.section-hero-text {
    font-size: 17px;
    color: var(--text-secondary);
    margin-bottom: 32px;
    max-width: 500px;
    line-height: 1.7;
}

/* ===== Intro Stats ===== */
.intro__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 40px;
}

.tag {
    padding: 6px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.intro__stats {
    display: flex;
    gap: 32px;
}

.intro__stat {
    padding: 24px 32px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}

.intro__stat-value {
    font-size: 42px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
    display: block;
    margin-bottom: 8px;
}

.intro__stat-label {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.4;
}

/* ===== About ===== */
.about__text {
    margin-bottom: 28px;
}

.about__text p {
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-size: 16px;
    line-height: 1.8;
}

.about__text strong {
    color: var(--text-primary);
    font-weight: 600;
}

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

.skill-tag {
    padding: 6px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
}

.skill-tag:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* ===== Topic Cards ===== */
.topics__list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.topic-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 28px 32px;
    transition: var(--transition);
    position: relative;
}

.topic-card:hover {
    border-color: rgba(49, 130, 206, 0.3);
    background: var(--bg-card-hover);
}

.topic-card__header {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 16px;
}

.topic-card__number {
    font-size: 14px;
    font-weight: 800;
    color: var(--primary);
    background: rgba(49, 130, 206, 0.1);
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.topic-card__title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    padding-top: 8px;
}

.topic-card__list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-left: 60px;
}

.topic-card__list li {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    padding-left: 16px;
    position: relative;
}

.topic-card__list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 9px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--text-muted);
}

/* ===== Achievements ===== */
.achievements__counters {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 32px;
}

.counter {
    text-align: center;
    padding: 24px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    transition: var(--transition);
}

.counter:hover {
    border-color: rgba(49, 130, 206, 0.3);
}

.counter__value {
    font-size: clamp(28px, 3vw, 40px);
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 8px;
    letter-spacing: -1px;
}

.counter__label {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
    font-weight: 500;
}

.achievements__list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.achievement-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    transition: var(--transition);
}

.achievement-item:hover {
    border-color: rgba(49, 130, 206, 0.3);
}

.achievement-item__icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(49, 130, 206, 0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.achievement-item span {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ===== Gallery: Videos ===== */
.gallery__videos {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.gallery__video {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

.gallery__video iframe {
    width: 100%;
    height: 100%;
    display: block;
}

.gallery__video--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery__video-soon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--text-muted);
}

.gallery__video-soon svg {
    opacity: 0.3;
}

.gallery__video-soon span {
    font-size: 13px;
    font-weight: 500;
}

/* ===== Gallery: Photos ===== */
.gallery__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.gallery__item {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 4 / 3;
}

.gallery__item--wide {
    grid-column: span 2;
    aspect-ratio: 16 / 9;
}

.gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery__item:hover img {
    transform: scale(1.05);
}

.gallery__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, transparent 50%);
    display: flex;
    align-items: flex-end;
    padding: 16px;
    opacity: 0;
    transition: var(--transition);
}

.gallery__item:hover .gallery__overlay {
    opacity: 1;
}

.gallery__caption {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
}

/* ===== Contact ===== */
.contact__subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    margin-top: -20px;
    margin-bottom: 32px;
}

.contact__cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 32px;
}

.contact__card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    transition: var(--transition);
}

.contact__card:hover {
    border-color: rgba(49, 130, 206, 0.3);
}

.contact__card-icon {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: rgba(49, 130, 206, 0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact__card-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    margin-bottom: 2px;
}

.contact__card-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    transition: var(--transition);
}

.contact__card-value:hover {
    color: var(--primary);
}

.contact__cta-box {
    background: linear-gradient(135deg, rgba(49, 130, 206, 0.1), rgba(49, 130, 206, 0.03));
    border: 1px solid rgba(49, 130, 206, 0.2);
    border-radius: var(--radius-lg);
    padding: 40px;
    text-align: center;
}

.contact__cta-box h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
}

.contact__cta-box p {
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.7;
    font-size: 15px;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: 50px;
    font-family: var(--font);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    white-space: nowrap;
}

.btn--primary {
    background: var(--primary);
    color: #fff;
}

.btn--primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(49, 130, 206, 0.3);
}

.btn--large {
    padding: 16px 36px;
    font-size: 15px;
}

/* ===== Footer ===== */
.footer {
    padding: 32px 0;
    border-top: 1px solid var(--border-color);
    margin-top: 20px;
}

.footer p {
    font-size: 13px;
    color: var(--text-muted);
}

/* ===== Mobile Bottom Bar ===== */
.mobile-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-color);
    padding: 10px 0;
    justify-content: space-around;
    z-index: 100;
}

.mobile-bar__link {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: var(--transition);
}

.mobile-bar__link.active {
    color: var(--primary);
    background: rgba(49, 130, 206, 0.1);
}

/* ===== Reveal Animations ===== */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

.reveal:nth-child(2) { transition-delay: 0.08s; }
.reveal:nth-child(3) { transition-delay: 0.16s; }
.reveal:nth-child(4) { transition-delay: 0.24s; }
.reveal:nth-child(5) { transition-delay: 0.32s; }
.reveal:nth-child(6) { transition-delay: 0.4s; }

/* ===== Responsive ===== */

/* Large desktop — чуть уже отступы */
@media (max-width: 1400px) {
    .content {
        padding: 40px 48px 40px 36px;
    }
}

/* Tablets / small laptops */
@media (max-width: 1200px) {
    :root {
        --sidebar-width: 400px;
    }

    .content {
        max-width: none;
        padding: 32px 40px 32px 24px;
    }

    .achievements__counters {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact__cards {
        grid-template-columns: 1fr;
    }
}

/* Mobile — полная перестройка: карточка сверху как в Jayden */
@media (max-width: 900px) {
    .layout {
        flex-direction: column;
    }

    /* Sidebar → full-screen hero block */
    .sidebar {
        width: 100%;
        min-height: 100svh;
        min-height: 100vh; /* fallback */
        position: relative;
        padding: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Card fills the width */
    .card {
        width: 100%;
        max-width: 420px;
        max-height: none;
        margin: 0 auto;
        padding: 20px;
    }

    /* Photo — compact square ratio for mobile */
    .card__photo {
        aspect-ratio: 1 / 1;
        margin-bottom: 16px;
    }

    .card__info {
        margin-bottom: 12px;
    }

    .card__name {
        font-size: 22px;
    }

    .card__role {
        font-size: 13px;
    }

    .card__socials {
        gap: 10px;
        margin-bottom: 12px;
        flex-shrink: 0;
    }

    .card__social {
        width: 38px;
        height: 38px;
    }

    .card__cta {
        padding: 12px 16px;
        font-size: 13px;
        flex-shrink: 0;
    }

    .card__cta svg {
        width: 28px;
        height: 28px;
    }

    /* Hide desktop side-nav, show mobile bar */
    .side-nav {
        display: none;
    }

    .mobile-bar {
        display: flex;
    }

    /* Content padding for mobile */
    .content {
        max-width: none;
        padding: 8px 20px 90px;
    }

    .section {
        padding: 40px 0;
    }

    .section--intro {
        min-height: auto;
        padding-top: 16px;
    }

    .section-hero-title {
        font-size: 32px;
    }

    .section-title {
        font-size: 26px;
        margin-bottom: 24px;
    }

    .intro__stats {
        flex-wrap: wrap;
        gap: 12px;
    }

    .intro__stat {
        padding: 20px 24px;
        flex: 1;
        min-width: 140px;
    }

    .intro__stat-value {
        font-size: 32px;
    }

    .topic-card {
        padding: 20px;
    }

    .topic-card__header {
        gap: 14px;
    }

    .topic-card__number {
        width: 36px;
        height: 36px;
        font-size: 13px;
    }

    .topic-card__title {
        font-size: 16px;
        padding-top: 6px;
    }

    .topic-card__list {
        padding-left: 50px;
    }

    .gallery__videos {
        grid-template-columns: 1fr;
    }

    .gallery__grid {
        grid-template-columns: 1fr 1fr;
    }

    .gallery__item--wide {
        grid-column: span 2;
    }

    .contact__cta-box {
        padding: 32px 24px;
    }
}

/* Small phones */
@media (max-width: 540px) {
    .sidebar {
        padding: 16px;
    }

    .card {
        max-width: none;
        padding: 14px;
    }

    .card__photo {
        aspect-ratio: 1 / 1.05;
        margin-bottom: 12px;
    }

    .card__info {
        margin-bottom: 10px;
    }

    .card__name {
        font-size: 20px;
    }

    .card__role {
        font-size: 12px;
        margin-bottom: 4px;
    }

    .card__location {
        font-size: 12px;
    }

    .card__socials {
        gap: 8px;
        margin-bottom: 10px;
    }

    .card__social {
        width: 36px;
        height: 36px;
    }

    .card__social svg {
        width: 16px;
        height: 16px;
    }

    .card__cta {
        padding: 10px 14px;
        font-size: 12px;
    }

    .card__cta svg {
        width: 24px;
        height: 24px;
    }

    .content {
        padding: 8px 16px 90px;
    }

    .section-hero-title {
        font-size: 26px;
    }

    .section-hero-text {
        font-size: 15px;
    }

    .intro__tags {
        gap: 6px;
    }

    .tag {
        font-size: 12px;
        padding: 5px 12px;
    }

    .intro__stats {
        flex-direction: column;
    }

    .intro__stat {
        min-width: 0;
    }

    .topic-card__list {
        padding-left: 0;
    }

    .topic-card__list li {
        font-size: 13px;
    }

    .achievements__counters {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .counter {
        padding: 16px 8px;
    }

    .counter__value {
        font-size: 24px;
    }

    .counter__label {
        font-size: 11px;
    }

    .gallery__grid {
        grid-template-columns: 1fr;
    }

    .gallery__item--wide {
        grid-column: span 1;
    }

    .contact__cards {
        grid-template-columns: 1fr;
    }

    .contact__cta-box {
        padding: 24px 16px;
    }

    .contact__cta-box h3 {
        font-size: 18px;
    }

    .btn--large {
        padding: 14px 28px;
        font-size: 14px;
    }
}

/* Very small phones (iPhone SE, etc.) */
@media (max-width: 400px) {
    .card__photo {
        aspect-ratio: 1 / 0.95;
    }

    .card__name {
        font-size: 18px;
    }

    .card__role {
        font-size: 11px;
    }

    .card__info {
        margin-bottom: 8px;
    }

    .card__socials {
        margin-bottom: 8px;
    }

    .card__social {
        width: 34px;
        height: 34px;
    }

    .card__cta {
        padding: 8px 12px;
    }
}
