:root {
    --bg: #0f0f0f;
    --bg-soft: #181818;
    --accent: #f5b2a6;
    --accent-strong: #ff7b5f;
    --text: #f5f4f2;
    --muted: #bab6b0;
    --border: rgba(255,255,255,0.08);
    --font-main: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
    --yam-yellow: #ffd54f;
    --yam-orange: #ff8a2b;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-main);
    line-height: 1.6;
    min-height: 100vh;
    scroll-behavior: smooth;
}

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

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

.wrapper {
    max-width: 1238px;
}

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

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 20;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem clamp(1rem, 4vw, 4rem);
    background: transparent;
    border-bottom: none;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.site-header.is-scrolled {
    background: rgba(15, 15, 15, 0.95);
}


.logo {
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.main-nav {
    display: flex;
    gap: 1.5rem;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.main-nav a {
    position: relative;
    padding-bottom: 0.2rem;
}

.main-nav a::after {
    content: "";
    position: absolute;
    inset: auto 0 -0.3rem 0;
    height: 2px;
    background: var(--accent);
    opacity: 0;
    transform: translateY(5px);
    transition: 0.3s;
}

.main-nav a:hover::after {
    opacity: 1;
    transform: translateY(0);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 0.4rem;
    background: none;
    border: none;
    cursor: pointer;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text);
    display: block;
}

main {
    margin-top: 0;
    padding-top: 0;
    display: flex;
    flex-direction: column;
}

.hero {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
}

.hero-photo {
    position: relative;
    /* фиксируем высоту, чтобы не "подрастала" при скрытии браузерных панелей */
    min-height: 100vh;
    min-height: 100svh;
    height: 100vh;
    height: 100svh;
}

.hero-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: saturate(1.15);
}

.hero-card {
    position: absolute;
    inset: auto clamp(1.5rem, 4vw, 3rem) clamp(2.5rem, 5vw, 4rem);
    padding: clamp(1.5rem, 3vw, 3rem);
    max-width: min(520px, 90%);
}

.hero-label {
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--muted);
    font-size: 0.75rem;
}

.hero-card h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    margin: 0.2rem 0;
}

.hero-desc {
    max-width: 60ch;
    margin: -0.5rem 0 0;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.5rem;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
    margin-top: 1.5rem;
}

section {
    scroll-margin-top: 120px;
}

.block {
    background: var(--bg-soft);
}

.photo-block {
    background: #040404;
    min-height: 360px;
    overflow: hidden;
    background-image: url("/img/perova2.jpg");
    background-size: cover;    /* растягивает фон, заполняя блок */
    background-position: left 25%; /* центрируем */
    background-repeat: no-repeat;
    display: flex;
}



.hero-bio {
    background-color: rgba(15, 15, 15, 0.95);
    inset: auto clamp(1.5rem, 4vw, 3rem) clamp(2.5rem, 5vw, 4rem);
    padding: clamp(1.5rem, 3vw, 3rem);
    max-width: min(520px, 90%);
    margin-left: auto;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.8rem;
    border-radius: 999px;
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.85rem;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.btn.primary {
    background: linear-gradient(120deg, var(--accent-strong), var(--accent));
    color: #0f0f0f;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.25s ease;
    border: none;
}

.btn.primary::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0));
    opacity: 0;
    transform: translateX(-20%);
    transition: opacity 0.3s ease, transform 0.35s ease;
    border-radius: inherit;
    pointer-events: none;
}

.btn.primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 10px 28px rgba(255, 123, 95, 0.35);
}

.btn.primary:hover::after {
    opacity: 1;
    transform: translateX(0);
}
.btn.secondary {
    border: 2px solid var(--text);
    color: var(--text);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn.secondary::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, var(--accent-strong), var(--accent));
    transform: translateX(-100%);
    transition: transform 0.4s ease;
    z-index: -1;
}

.btn.secondary:hover::before {
    transform: translateX(0);
}

.stat {
    padding: 1rem 1.5rem;
    border: 1px solid var(--border);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.02);
}

.stat-value {
    font-size: 2rem;
    font-weight: 600;
    display: block;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: var(--muted);
    font-size: 0.8rem;
    margin-bottom: 0.6rem;
}

.split {
    padding: 1.5rem;
}

.yandex-music {
    /* background: radial-gradient(circle at 10% 20%, rgba(255, 213, 79, 0.08), transparent 40%), var(--bg-soft); */
    background-image: url("/img/perova7.jpg");
    background-size: cover;    /* растягивает фон, заполняя блок */
    background-position: center 50%; /* приподнимаем кадр, убираем верхний отступ */
    background-repeat: no-repeat;
    padding: clamp(2rem, 5vw, 3rem);
    display: flex;
    justify-content: center;
}

.music-bio {
    width: min(100%, 720px);
    /* background-color: rgba(15, 15, 15, 0.95); */
    inset: auto clamp(1.5rem, 4vw, 3rem) clamp(2.5rem, 5vw, 4rem);
    padding: clamp(1.5rem, 3vw, 3rem);
    /* max-width: min(520px, 90%); */
    margin-right: auto;
}

.split-media {
    gap: 1.5rem;
    display: flex;
    justify-content: center; /* по горизонтали */
    align-items: center; 
}

.split-content {
    padding: 1.5rem 2.5rem;
}

.portrait-frame {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    max-width: 400px;
    max-height: 249px;
}

.school-img {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    width: 100%;
    max-width: 396px;
    aspect-ratio: 9 / 16;
}

.school-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;     /* обрезка под 16:9 */
    object-position: center;
}

.note {
    color: var(--muted);
    font-size: 0.8rem;
    margin-top: 0.8rem;
}

.facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    margin: 2rem 0;
    gap: 1rem;
}

.fact-label {
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 0.7rem;
}

.fact-value {
    display: block;
    font-weight: 600;
}

.section-heading {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
}

.projects {
    padding: 2rem 4rem;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    padding: 0 0 2rem 0;
}

.project-grid article,
.news-list article,
.event-cards article {
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.01);
}

.project-type {
    color: var(--muted);
    font-size: 0.85rem;
}

.news-list {
    display: grid;
    gap: 1.5rem;
}

.news-list time {
    display: block;
    font-size: 0.8rem;
    color: var(--muted);
}

.events {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.event-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.event-city {
    font-size: 1.2rem;
    font-weight: 600;
}

.event-date {
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.8rem;
}

.cta {
    background: linear-gradient(135deg, rgba(255, 123, 95, 0.25), rgba(255, 123, 95, 0));
    border: 1px solid var(--border);
    border-radius: 1.5rem;
    padding: clamp(2rem, 6vw, 4rem);
}

.cta .eyebrow.light {
    color: rgba(255, 255, 255, 0.6);
}

.contact {
    position: relative;
    background-image: url("/img/perova13.jpg");
    background-size: cover;    /* растягивает фон, заполняя блок */
    background-position: center center; /* приподнимаем кадр, убираем верхний отступ */
    background-repeat: no-repeat;
    padding: clamp(2rem, 5vw, 3.5rem);
}

.contact::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(140deg, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.35));
    z-index: 0;
}

.contact-grid {
    position: relative;
    z-index: 1;
    background-color: rgba(15, 15, 15, 0.95);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    align-items: start;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    width: min(1080px, 100%);
    margin: 0 auto;
    padding: clamp(1.5rem, 4vw, 2.25rem);
    backdrop-filter: blur(8px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
}

.contact-intro {
    display: grid;
    gap: 0.75rem;
}

.contact-note {
    color: var(--muted);
    margin: 20px 0;
}

.contact-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.contact-tags span {
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    font-size: 0.85rem;
    color: var(--text);
}

.contact-form {
    display: grid;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: clamp(1.25rem, 3vw, 1.75rem);
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    margin-top: 0.4rem;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border);
    background: rgba(15, 15, 15, 0.7);
    color: var(--text);
}

#header-contact {
    text-align: center;
}

.form-alert {
    padding: 0.85rem 1rem;
    border: 1px solid var(--border);
    border-radius: 0.85rem;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.form-alert.success {
    border-color: rgba(46, 204, 113, 0.4);
    color: #6cea9c;
}

.form-alert.error {
    border-color: rgba(255, 123, 95, 0.6);
    color: var(--accent);
}

.text-link {
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 0.75rem;
}

.site-footer {
    padding: 1rem clamp(1rem, 6vw, 4rem) 1rem;
    border-top: 1px solid var(--border);
    font-size: 0.8rem;
}

.socials {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
}

.socials a {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    color: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: 0.25s ease;
}

.socials a.wd-icon {
    background-size: 70%;
}

.socials a:hover {
    color: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
}

.wd-icon {
    display: block;
    width: 100%;
    height: 100%;
    background-position: center;
    background-repeat: no-repeat;
    background-size: 90%;
}

.wd-icon--ig {
    background-image: url("/img/ig.png");
    background-size: 100%;
}

.wd-icon--vk {
    background-image: url("/img/vk.png");
    background-size: 100%;
}

.wd-icon--tg {
    background-image: url("/img/tg.png");
    background-size: 100%;
}

.back-to-top {
    position: fixed;
    right: clamp(1rem, 4vw, 1.75rem);
    bottom: clamp(1.2rem, 5vw, 2rem);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: linear-gradient(120deg, var(--accent-strong), var(--accent));
    color: #0f0f0f;
    font-size: 1.1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.35);
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
    z-index: 50;
}

.back-to-top.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.back-to-top:hover,
.back-to-top.is-visible:hover {
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
    transform: translateY(-2px) scale(1.05);
}

@media (max-width: 720px) {
    body {
        font-size: 0.96rem;
    }

    .hero-bio {
        border-radius: 1.25rem;
        border: 1px solid rgba(255, 255, 255, 0.06);
        max-width: 88%;
        padding: 1rem 1.25rem;
        margin: 1rem auto;
        background-color: rgba(15, 15, 15, 0.82);
    }

    .hero-bio h1 {
        font-size: 1.4rem;
        margin-bottom: 0.5rem;
    }

    .hero-bio .hero-desc {
        font-size: 0.95rem;
    }

    .hero-photo {
        min-height: 420px;
    }

    .hero-card {
        inset: auto 1rem 1rem;
        max-width: 100%;
    }

    .photo-block {
        min-height: 240px;
    }

    .contact-grid {
        width: 100%;
        padding: 1.25rem;
        gap: 1rem;
    }

    .main-nav {
        position: fixed;
        inset: 72px 0 auto 0;
        width: 50vw;
        margin-left: auto;
        background: #111;
        border: 1px solid var(--border);
        border-radius: 1rem 0 0 1rem;
        padding: 1rem 1.25rem;
        flex-direction: column;
        gap: 1rem;
        opacity: 0;
        pointer-events: none;
        transform: translateX(110%);
        transition: transform 0.3s ease, opacity 0.25s ease;
        box-shadow: -12px 0 30px rgba(0, 0, 0, 0.35);
        z-index: 25;
    }

    .main-nav.open {
        opacity: 1;
        pointer-events: auto;
        transform: translateX(0);
        background-color: rgba(15, 15, 15, 0.95);
    }

    .nav-toggle {
        display: flex;
    }
}


/* Яндекс музыка блок */

.yam-card {
    width: min(500px, 100%);
    border-radius: 24px;
    background: linear-gradient(135deg, #111 0%, #1d1d1d 40%, #0c0c0c 100%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
    overflow: hidden;
    display: grid;
    grid-template-columns: 180px 1fr;
    position: relative;
    isolation: isolate;
}

.yam-card::before {
    content: "";
    position: absolute;
    inset: -20% -10% auto auto;
    width: 240px;
    height: 240px;
    background: radial-gradient(circle at 30% 30%, var(--yam-yellow), rgba(255, 213, 79, 0) 60%);
    opacity: 0.45;
    filter: blur(4px);
    transform: rotate(-8deg);
}

.yam-card::after {
    content: none; /* убрали декоративный квадратик */
}

.yam-art {
    position: relative;
    background-image: url("/img/perova4.jpg");
    background-size: cover;    /* растягивает фон, заполняя блок */
    background-position: center 50%; /* приподнимаем кадр, убираем верхний отступ */
    background-repeat: no-repeat;
    height: 100%;
    min-height: 100%;
    filter: saturate(1.05);
}

.yam-art::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.55));
}

.yam-body {
    padding: 24px 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    z-index: 1;
}

.yam-kicker {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--yam-yellow);
    font-size: 12px;
}

.yam-title {
    font-size: 28px;
    margin: 0;
    letter-spacing: 0.01em;
}

.yam-sub {
    margin: 0;
    color: #d9d6cf;
    line-height: 1.4;
}

.yam-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: #f4e1a1;
    font-size: 12px;
    width: fit-content;
}

.yam-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--yam-yellow), var(--yam-orange));
    box-shadow: 0 0 0 4px rgba(255, 138, 43, 0.18);
}

.yam-link {
    margin-top: auto;
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 16px;
    border-radius: 14px;
    background: linear-gradient(120deg, var(--yam-yellow), var(--yam-orange));
    background-size: 180% 180%;
    color: #0c0c0c;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 0.02em;
    box-shadow: 0 12px 30px rgba(255, 138, 43, 0.35);
    transition: transform 0.25s ease, box-shadow 0.25s ease, background-position 0.35s ease;
}

.yam-link:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 18px 40px rgba(255, 138, 43, 0.42);
    background-position: 100% 50%;
    color: #fff;
}

/* .btn.secondary {
    border-color: var(--text);
    color: var(--text);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn.secondary::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, var(--accent-strong), var(--accent));
    transform: translateX(-100%);
    transition: transform 0.4s ease;
    z-index: -1;
}

.btn.secondary:hover::before {
    transform: translateX(0);
} */

/* .yam-link span {
    display: inline-block;
} */

@media (max-width: 640px) {
    .yam-card {
        background: none !important;
        height: auto;
        min-height: 320px;
        grid-template-columns: 1fr;
    }

    .yam-art {
        height: 180px;
        min-height: 180px;
        background-position: center 55%;
    }
}

@media (max-width: 540px) {
    body {
        font-size: 0.9rem;
    }

    .site-header {
        padding: 1rem 0.9rem;
    }

    .logo {
        font-size: 0.95rem;
        letter-spacing: 0.16em;
    }

    .hero-photo {
        min-height: 360px;
    }

    .hero-card {
        inset: auto 0.9rem 0.9rem;
        padding: 1.1rem;
    }

    .hero-card h1 {
        font-size: clamp(2rem, 8vw, 2.4rem);
    }

    .hero-desc {
        font-size: 0.95rem;
    }

    .hero-actions {
        gap: 0.65rem;
    }

    .btn {
        padding: 0.75rem 1.3rem;
        font-size: 0.8rem;
    }

    .main-nav {
        width: 50vw;
        padding: 1rem;
        border-radius: 1rem 0 0 1rem;
    }

    .split {
        padding: 1rem 0.75rem;
    }

    .split-content {
        padding: 1rem;
    }

    .split-media {
        flex-direction: column;
        gap: 0.9rem;
    }

    .portrait-frame,
    .school-img {
        width: 100%;
        max-width: 100%;
    }

    .projects {
        padding: 1.25rem;
    }

    .project-grid {
        gap: 1rem;
    }

    .contact {
        padding: 1.5rem 0.9rem;
    }

    .contact-grid {
        padding: 1rem;
        gap: 1rem;
    }

    .contact-form {
        margin-top: 1rem;
        gap: 0.85rem;
    }

    .yam-body {
        padding: 18px;
        background-color: rgba(15, 15, 15, 0.95);
    }

    .yam-title {
        font-size: 24px;
    }

    .site-footer {
        padding: 1.5rem 1rem 2rem;
        align-items: flex-start;
    }

    .back-to-top {
        width: 48px;
        height: 48px;
        right: 1rem;
        bottom: 1rem;
    }
}
