:root {
    --ink: #0BA8A2;
    --ink-2: #0ad1c9;
    --paper: #EAF8F7;
    --paper-2: #FFFFFF;
    --gold: #0ad1c9;
    --vermillion: #ef4056;
    --text-on-ink: #FFFFFF;
    --text-muted-on-ink: #d6eeec;
    --text-on-paper: #000000;
    --text-muted-on-paper: #3d4a49;
    --radius: 14px;
    --serif: "PT Serif", Georgia, serif;
    --sans: "Golos Text", "Segoe UI", sans-serif;
    --mono: "JetBrains Mono", monospace;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--sans);
    background: var(--paper);
    color: var(--text-on-paper);
    line-height: 1.5;
    overflow-x: hidden;
}

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

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

.container {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 28px;
}

.eyebrow {
    font-family: var(--mono);
    font-size: 12.5px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-weight: 500;
}

/* ---------- Header (идентичен макету, добавлены Библиотека и Кабинет) ---------- */
header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(246, 243, 234, 0.92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(32, 35, 63, 0.08);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 28px;
    gap: 24px;
}

.logo {
    font-family: var(--serif);
    font-weight: 700;
    font-size: 21px;
    display: flex;
    align-items: center;
    gap: 9px;
}

.logo-mark {
    height: 34px;
    width: auto;
    flex-shrink: 0;
}

.footer-logo-mark {
    height: 26px;
    width: auto;
    filter: brightness(0) invert(1);
}

.nav-links {
    display: flex;
    gap: 30px;
    font-size: 14.5px;
    font-weight: 500;
    flex: 1;
}

.nav-links a {
    opacity: 0.78;
    transition: opacity .2s;
}

.nav-links a:hover {
    opacity: 1;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}

.cabinet-link {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 14.5px;
    font-weight: 600;
    color: var(--vermillion);
}

.cabinet-link svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.nav-cta {
    font-family: var(--sans);
    font-weight: 600;
    font-size: 14px;
    background: var(--ink);
    color: var(--text-on-ink);
    padding: 10px 20px;
    border-radius: 999px;
    white-space: nowrap;
    transition: background .2s;
}

.nav-cta:hover {
    background: var(--vermillion);
}

.btn {
    font-family: var(--sans);
    font-weight: 600;
    font-size: 15px;
    padding: 14px 26px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
    cursor: pointer;
    border: none;
}

.btn-outline {
    background: transparent;
    color: var(--ink);
    border: 1.5px solid rgba(32, 35, 63, 0.25);
}

.btn-outline:hover {
    border-color: var(--vermillion);
    color: var(--vermillion);
}

section {
    padding: 80px 0;
}

.section-head {
    max-width: 640px;
    margin-bottom: 36px;
}

.section-head .eyebrow {
    color: var(--vermillion);
    margin-bottom: 14px;
    display: block;
}

.section-head h2 {
    font-family: var(--serif);
    font-weight: 700;
    font-size: clamp(26px, 3.2vw, 34px);
    line-height: 1.15;
    margin-bottom: 14px;
}

.section-head p {
    color: var(--text-muted-on-paper);
    font-size: 16px;
}

/* ---------- Профиль (переосмысленный hero) ---------- */
.profile-hero {
    position: relative;
    background: radial-gradient(ellipse 900px 500px at 18% -10%, #0ccec6 0%, var(--ink) 55%), var(--ink);
    color: var(--text-on-ink);
    overflow: hidden;
    padding: 56px 0 80px;
}

.demo-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--mono);
    font-size: 11.5px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    padding: 6px 14px;
    border-radius: 999px;
    color: var(--text-muted-on-ink);
    margin-bottom: 28px;
}

.demo-tag .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--gold);
    flex-shrink: 0;
}

.profile-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 56px;
    align-items: center;
}

.avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--serif);
    font-weight: 700;
    font-size: 26px;
    margin-bottom: 22px;
}

.profile-name {
    font-family: var(--serif);
    font-weight: 700;
    font-size: clamp(28px, 3.6vw, 40px);
    line-height: 1.08;
    margin-bottom: 12px;
}

.profile-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 16px;
    font-size: 14px;
    color: var(--text-muted-on-ink);
    margin-bottom: 20px;
}

.profile-meta span {
    display: flex;
    align-items: center;
    gap: 7px;
}

.profile-meta svg {
    width: 15px;
    height: 15px;
}

.profile-bio {
    font-size: 16.5px;
    color: var(--text-muted-on-ink);
    max-width: 460px;
}

.manuscript {
    position: relative;
    background: var(--paper-2);
    color: var(--text-on-paper);
    border-radius: var(--radius);
    padding: 28px 30px 24px;
    box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.5);
    transform: rotate(1.5deg);
}

.manuscript::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: var(--radius);
    background: repeating-linear-gradient(180deg, transparent 0 37px, rgba(32, 35, 63, 0.06) 37px 38px);
    pointer-events: none;
}

.manuscript-tag {
    font-family: var(--mono);
    font-size: 11.5px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--vermillion);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.manuscript-status {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted-on-paper);
    background: rgba(32, 35, 63, 0.07);
    padding: 4px 10px;
    border-radius: 999px;
    white-space: nowrap;
}

.manuscript-text {
    font-family: var(--serif);
    font-style: italic;
    font-size: 19px;
    line-height: 1.55;
    margin: 14px 0;
}

.manuscript-author {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--text-muted-on-paper);
}

/* ---------- Статистика ---------- */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.stat-card {
    background: var(--paper-2);
    border-radius: var(--radius);
    padding: 24px 22px;
}

.stat-card b {
    font-family: var(--serif);
    font-size: 32px;
    display: block;
    margin-bottom: 6px;
}

.stat-card span {
    font-size: 13.5px;
    color: var(--text-muted-on-paper);
}

/* ---------- Права и согласие ---------- */
.rights-panel {
    background: var(--ink);
    color: var(--text-on-ink);
    border-radius: 24px;
    padding: 48px;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 48px;
    align-items: center;
}

.rights-panel .eyebrow {
    color: var(--gold);
    margin-bottom: 12px;
    display: block;
}

.rights-panel h2 {
    font-family: var(--serif);
    font-size: clamp(22px, 2.8vw, 28px);
    line-height: 1.22;
    margin-bottom: 14px;
}

.rights-panel p {
    color: var(--text-muted-on-ink);
    font-size: 15px;
}

.consent-card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 14px;
    padding: 22px 24px;
}

.consent-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 14px;
}

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

.consent-check {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--gold);
    color: var(--ink);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 700;
}

.consent-actions {
    display: flex;
    gap: 16px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.consent-actions a {
    font-size: 13px;
    text-decoration: underline;
    color: var(--text-muted-on-ink);
    text-underline-offset: 3px;
}

.consent-actions a:hover {
    color: var(--text-on-ink);
}

/* ---------- Список произведений ---------- */
.filter-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.filter-pill {
    font-family: var(--sans);
    font-size: 13.5px;
    font-weight: 600;
    padding: 9px 18px;
    border-radius: 999px;
    border: 1.5px solid rgba(32, 35, 63, 0.16);
    color: var(--text-muted-on-paper);
    cursor: pointer;
    transition: all .2s ease;
    background: transparent;
}

.filter-pill:hover {
    border-color: var(--ink);
}

.filter-pill.active {
    background: var(--ink);
    border-color: var(--ink);
    color: #fff;
}

.works-list {
    margin-top: 20px;
}

.work-row {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: 20px;
    padding: 20px 0;
    border-top: 1px solid rgba(32, 35, 63, 0.1);
}

.work-icon {
    width: 22px;
    height: 22px;
    color: var(--vermillion);
    flex-shrink: 0;
}

.work-main h3 {
    font-family: var(--serif);
    font-size: 17.5px;
    margin-bottom: 4px;
}

.work-main .work-meta {
    font-size: 12.5px;
    color: var(--text-muted-on-paper);
    font-family: var(--mono);
}

.status-badge {
    font-family: var(--mono);
    font-size: 10.5px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 999px;
    white-space: nowrap;
}

.status-published {
    background: var(--ink);
    color: #fff;
}

.status-review {
    background: transparent;
    border: 1.3px solid rgba(32, 35, 63, 0.3);
    color: var(--text-muted-on-paper);
}

.status-draft {
    background: transparent;
    border: 1.3px dashed rgba(32, 35, 63, 0.28);
    color: rgba(61, 74, 73, 0.65);
}

.work-views {
    font-family: var(--mono);
    font-size: 12.5px;
    color: var(--text-muted-on-paper);
    white-space: nowrap;
    text-align: right;
}

.next-cta {
    text-align: center;
    padding: 44px 24px;
    border: 1.5px dashed rgba(32, 35, 63, 0.2);
    border-radius: var(--radius);
    margin-top: 28px;
}

.next-cta p {
    color: var(--text-muted-on-paper);
    margin-bottom: 18px;
    font-size: 15px;
}

footer {
    background: var(--ink);
    color: var(--text-muted-on-ink);
    padding: 56px 0 32px;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 36px;
    margin-bottom: 28px;
    border-bottom: 1px solid rgba(237, 233, 218, 0.12);
    flex-wrap: wrap;
    gap: 24px;
}

.footer-links {
    display: flex;
    gap: 48px;
    flex-wrap: wrap;
}

.footer-links h4 {
    font-family: var(--mono);
    font-size: 11.5px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 14px;
    font-weight: 500;
}

.footer-links ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 9px;
    font-size: 14px;
}

.footer-links a:hover {
    color: var(--text-on-ink);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    font-size: 12.5px;
    flex-wrap: wrap;
    gap: 12px;
}

.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .7s ease, transform .7s ease;
}

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

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    html {
        scroll-behavior: auto;
    }
}

@media (max-width:920px) {
    .nav-links {
        display: none;
    }

    .profile-grid {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .stats-row {
        grid-template-columns: 1fr 1fr;
    }

    .rights-panel {
        grid-template-columns: 1fr;
        padding: 36px 28px;
    }

    .work-row {
        grid-template-columns: auto 1fr auto;
    }

    .work-views {
        display: none;
    }
}

@media (max-width:560px) {
    section {
        padding: 56px 0;
    }

    .work-row {
        grid-template-columns: auto 1fr;
        row-gap: 10px;
    }

    .status-badge {
        grid-column: 2;
        justify-self: start;
    }
}