.wrap {
    max-width: 980px;
    margin: 0 auto;
    padding: 0 26px;
}

.eyebrow {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--accent);
    margin: 0 0 14px;
}

section {
    padding: 96px 0;
}

/* ============================ NAV ============================ */
.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: color-mix(in srgb, var(--bg) 86%, transparent);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid transparent;
    transition: border-color .3s, background .4s;
}

.nav.scrolled {
    border-bottom-color: var(--line);
}

.nav-inner {
    max-width: 980px;
    margin: 0 auto;
    padding: 16px 26px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 11px;
    font-weight: 700;
    color: var(--heading);
    letter-spacing: -.01em;
}

.logo .mono {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--heading);
    color: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 15px;
    letter-spacing: .02em;
    transition: background .4s, color .4s;
}

.logo small {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--muted);
    letter-spacing: 0;
    margin-top: -2px;
}

.nav-links {
    display: flex;
    gap: 6px;
    margin-left: auto;
}

.nav-links a {
    font-size: 15px;
    font-weight: 500;
    color: var(--muted);
    padding: 8px 13px;
    border-radius: 8px;
    transition: color .2s, background .2s;
}

.nav-links a:hover {
    color: var(--heading);
}

.nav-links a.active {
    color: var(--accent);
    background: var(--accent-soft);
}

.theme-btn {
    margin-left: 8px;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    flex: none;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--heading);
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s, border-color .2s, transform .2s;
}

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

.lang {
    display: inline-flex;
    gap: 2px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 9px;
    padding: 3px;
}

.lang button {
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: .02em;
    border: 0;
    background: transparent;
    color: var(--muted);
    padding: 6px 9px;
    border-radius: 6px;
    cursor: pointer;
    transition: background .18s, color .18s;
}

.lang button:hover {
    color: var(--heading);
}

.lang button.active {
    background: var(--surface);
    color: var(--accent);
    box-shadow: var(--shadow-sm);
}

html[data-theme="dark"] .lang button.active {
    box-shadow: none;
}

@media(max-width:680px) {
    .lang button {
        padding: 6px 7px;
        font-size: 12px;
    }
}

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

    .nav-inner {
        gap: 10px;
    }
}

/* ============================ HERO ============================ */
.hero {
    padding-top: 104px;
    padding-bottom: 86px;
}

.hero h1 {
    font-size: clamp(42px, 7vw, 72px);
    font-weight: 800;
    margin: 6px 0 0;
}

.hero .role {
    font-size: clamp(19px, 2.4vw, 23px);
    font-weight: 600;
    color: var(--accent);
    margin-top: 10px;
}

.hero .tagline {
    font-size: clamp(18px, 2.2vw, 21px);
    color: var(--text);
    max-width: 600px;
    margin-top: 24px;
    text-wrap: pretty;
}

.hero .tagline b {
    color: var(--heading);
    font-weight: 600;
}

.cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 38px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
    padding: 14px 26px;
    border-radius: 11px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: transform .18s, box-shadow .2s, background .2s, border-color .2s, color .2s;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: var(--accent-strong);
    transform: translateY(-2px);
}

.btn-ghost {
    background: transparent;
    color: var(--heading);
    border-color: var(--line);
}

.btn-ghost:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 26px;
    margin-top: 42px;
    color: var(--muted);
    font-size: 14.5px;
}

.hero-meta span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.hero-meta i {
    color: var(--accent);
}

/* ============================ SECTION HEADING ============================ */
.sec-head {
    margin-bottom: 42px;
    max-width: 620px;
}

.sec-head h2 {
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 700;
}

.sec-head p {
    color: var(--muted);
    margin-top: 14px;
    font-size: 18px;
    text-wrap: pretty;
}

/* ============================ ABOUT (grid) ============================ */
.about-lead {
    font-size: clamp(19px, 2.4vw, 24px);
    color: var(--heading);
    font-weight: 500;
    max-width: 760px;
    line-height: 1.5;
    text-wrap: pretty;
}

.about-lead .hl {
    color: var(--accent);
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    margin-top: 40px;
}

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 30px;
    box-shadow: var(--shadow-sm);
    transition: transform .25s, box-shadow .25s, border-color .25s;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
}

.card .yr {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: .04em;
}

.card h3 {
    font-size: 21px;
    font-weight: 700;
    margin: 8px 0 12px;
}

.card p {
    color: var(--text);
    font-size: 16px;
}

.about-strength {
    margin-top: 24px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: var(--accent-soft);
    border-radius: 16px;
    padding: 24px 28px;
}

.about-strength i {
    color: var(--accent);
    font-size: 22px;
    margin-top: 3px;
}

.about-strength p {
    color: var(--heading);
    font-weight: 500;
    font-size: 17px;
    margin: 0;
}

@media(max-width:680px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }
}

/* ============================ SKILLS ============================ */
.skills-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}

.skill-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 26px 28px;
    box-shadow: var(--shadow-sm);
}

.skill-card .cat {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 18px;
}

.skill-card .cat i {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    background: var(--accent-soft);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex: none;
}

.skill-card .cat h3 {
    font-size: 17px;
    font-weight: 700;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    font-size: 14.5px;
    font-weight: 500;
    color: var(--text);
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 9px;
    padding: 8px 14px;
    transition: transform .18s, border-color .18s, color .18s;
}

.tag:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    color: var(--accent);
}

@media(max-width:680px) {
    .skills-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================ PORTFOLIO ============================ */
.work-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}

.project {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 28px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    transition: transform .25s, box-shadow .25s, border-color .25s;
}

.project:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
}

.project-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.project-ico {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: var(--accent-soft);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
}

.project .num {
    font-family: ui-monospace, monospace;
    font-size: 13px;
    color: var(--muted);
}

.project h3 {
    font-size: 21px;
    font-weight: 700;
}

.project .desc {
    color: var(--text);
    font-size: 16px;
    margin-top: 10px;
    flex: 1;
    text-wrap: pretty;
}

.project .stack {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 18px 0 22px;
}

.project .stack span {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    background: var(--accent-soft);
    border-radius: 7px;
    padding: 4px 10px;
}

.project-links {
    display: flex;
    gap: 10px;
}

.lnk {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    font-size: 14.5px;
    font-weight: 600;
    padding: 11px 14px;
    border-radius: 10px;
    border: 1px solid var(--line);
    color: var(--heading);
    background: transparent;
    transition: background .2s, border-color .2s, color .2s, transform .18s;
}

.lnk:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    color: var(--accent);
}

.lnk.solid {
    background: var(--heading);
    color: var(--bg);
    border-color: var(--heading);
}

.lnk.solid:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

@media(max-width:680px) {
    .work-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================ CONTACT ============================ */
.contact-wrap {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 44px;
    box-shadow: var(--shadow);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 16px;
    margin-top: 30px;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: var(--bg);
    transition: transform .22s, border-color .22s, background .22s;
}

.contact-card:hover {
    transform: translateY(-3px);
    border-color: var(--accent);
    background: var(--accent-soft);
}

.contact-card i {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: var(--accent-soft);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    flex: none;
    transition: background .22s, color .22s;
}

.contact-card:hover i {
    background: var(--accent);
    color: #fff;
}

.contact-card .lbl {
    font-size: 13px;
    color: var(--muted);
}

.contact-card .val {
    font-weight: 600;
    color: var(--heading);
    font-size: 15.5px;
    word-break: break-word;
}

@media(max-width:760px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .contact-wrap {
        padding: 30px;
    }
}

/* ============================ FOOTER ============================ */
footer {
    border-top: 1px solid var(--line);
    padding: 34px 0;
}

.foot-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    color: var(--muted);
    font-size: 14.5px;
}

.foot-inner .dot {
    color: var(--accent);
}

/* ============================ SCROLL REVEAL ============================ */
/* base = visible; only hide when JS is present AND motion is allowed */
html.js .reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity .7s ease, transform .7s ease;
}

html.js .reveal.in {
    opacity: 1;
    transform: none;
}

/* hard reveal — instant, no transition (used as a safety net so content can never get stuck hidden) */
html.reveal-all .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
}

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

    html {
        scroll-behavior: auto;
    }
}

/* Filter bar */
.filter-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.filter-btn {
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 18px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    transition: all .2s;
}

.filter-btn:hover {
    color: var(--heading);
    border-color: var(--accent);
}

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

/* Анимация карточек */
.project {
    transition: opacity .3s ease, transform .3s ease;
}

.project.hidden {
    display: none;
}