/* =============================================
   PORTFOLIO V2 — EDITORIAL DARK
   Palette: #050505 base · #C2FF4D accent · #F0EDE6 warm white
   ============================================= */

:root {
    --bg: #050505;
    --bg-alt: #0d0d0d;
    --bg-card: #111111;
    --acc: #C2FF4D;
    --acc-dim: rgba(194, 255, 77, 0.12);
    --text: #F0EDE6;
    --text-sub: #999999;
    --border: rgba(255, 255, 255, 0.07);
    --border-h: rgba(255, 255, 255, 0.14);
    --radius: 12px;
    --ease: cubic-bezier(0.25, 1, 0.5, 1);
}

/* ---- RESET ---- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

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

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

h1,
h2,
h3,
h4 {
    font-family: 'Space Grotesk', sans-serif;
    line-height: 1.1;
    font-weight: 700;
}

/* ---- GRAIN OVERLAY ---- */
.grain {
    pointer-events: none;
    position: fixed;
    inset: -50%;
    width: 200%;
    height: 200%;
    z-index: 9999;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    animation: grain 0.5s steps(2) infinite;
}

@keyframes grain {

    0%,
    100% {
        transform: translate(0, 0);
    }

    25% {
        transform: translate(-2%, -2%);
    }

    50% {
        transform: translate(2%, 0);
    }

    75% {
        transform: translate(0, 2%);
    }
}

/* =============================================
   NAVIGATION
   ============================================= */
.nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 500;
    transition: background 0.4s var(--ease), border-color 0.4s;
}

.nav.scrolled {
    background: rgba(5, 5, 5, 0.9);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.nav-logo {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.nav-logo-dot {
    color: var(--acc);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 32px;
}

.nav-links a {
    font-size: 0.9rem;
    color: var(--text-sub);
    transition: color 0.25s;
    letter-spacing: 0.02em;
}

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

.nav-cta {
    font-size: 0.85rem;
    font-weight: 500;
    padding: 9px 22px;
    border: 1px solid var(--border-h);
    border-radius: 50px;
    transition: all 0.3s var(--ease);
}

.nav-cta:hover {
    background: var(--acc);
    color: #000;
    border-color: var(--acc);
}

.nav-burger {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-burger span {
    display: block;
    width: 22px;
    height: 1.5px;
    background: var(--text);
    transition: all 0.35s var(--ease);
    transform-origin: center;
}

/* Burger → X */
.nav-burger.open {
    position: fixed;
    top: 22px;
    right: 5%;
    z-index: 600;
}

.nav-burger.open span:nth-child(1) {
    transform: translateY(3.75px) rotate(45deg);
}

.nav-burger.open span:nth-child(2) {
    transform: translateY(-3.75px) rotate(-45deg);
}

/* =============================================
   HERO
   ============================================= */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 140px 5% 80px;
    position: relative;
    overflow: hidden;
}

/* decorative grid & video overlay */
.hero-bg-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(5, 5, 5, 0.8) 0%,
        rgba(5, 5, 5, 0.6) 50%,
        rgba(5, 5, 5, 1) 100%
    );
    z-index: 1;
}

.hero-inner {
    position: relative;
    z-index: 10;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

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

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--acc-dim);
    border: 1px solid rgba(194, 255, 77, 0.25);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--acc);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--acc);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(0.8);
    }
}

.hero-photo-wrap {
    flex-shrink: 0;
}

.hero-photo-ring {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    padding: 2px;
    background: linear-gradient(135deg, var(--acc), transparent 60%);
}

.hero-photo {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.hero-name {
    font-size: clamp(4rem, 10vw, 9rem);
    letter-spacing: -0.04em;
    line-height: 0.95;
    margin-bottom: 40px;
    background: linear-gradient(160deg, #fff 40%, #555 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-meta {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 50px;
    max-width: 640px;
}

.hero-role {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.1rem;
    color: var(--acc);
    font-weight: 500;
}

.hero-desc {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.7;
}

.hero-stats {
    display: flex;
    gap: 0;
    margin-bottom: 50px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    width: fit-content;
}

.stat {
    padding: 20px 36px;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.stat:last-child {
    border-right: none;
}

.stat-num {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1;
}

.stat-suffix {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--acc);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-sub);
    margin-top: 4px;
}

.stat-sep {
    display: none;
}

.hero-actions {
    display: flex;
    gap: 16px;
    align-items: center;
}

.btn-primary {
    background: var(--acc);
    color: #000;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 14px 32px;
    border-radius: 50px;
    transition: all 0.3s var(--ease);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(194, 255, 77, 0.3);
}

.btn-ghost {
    font-size: 0.95rem;
    color: var(--text-sub);
    transition: color 0.25s;
    padding: 14px 4px;
}

.btn-ghost:hover {
    color: var(--text);
}

.hero-scroll-hint {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--text-sub);
    font-size: 1.2rem;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(6px);
    }
}

/* =============================================
   SECTIONS
   ============================================= */
.section {
    padding: 120px 5%;
}

.section-alt {
    background: var(--bg-alt);
}

.section-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.section-label {
    font-size: 0.78rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-sub);
    margin-bottom: 20px;
}

.section-title {
    font-size: clamp(2.4rem, 5vw, 4rem);
    letter-spacing: -0.03em;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #fff 50%, #444);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-sub {
    font-size: 1.05rem;
    color: var(--text-sub);
    line-height: 1.7;
    max-width: 560px;
    margin-bottom: 60px;
}

/* =============================================
   WORKS
   ============================================= */
.works-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
}

.work-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: border-color 0.3s var(--ease);
}

.work-card:hover {
    border-color: var(--border-h);
}

.work-media {
    aspect-ratio: 1/1;
    overflow: hidden;
    position: relative;
    background: #0a0a0a;
}

.work-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease);
}

.work-card:hover .work-video {
    transform: scale(1.04);
}

.work-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 16px;
    background: linear-gradient(135deg, transparent 50%, rgba(0, 0, 0, 0.5));
    opacity: 0;
    transition: opacity 0.3s;
}

.work-card:hover .work-overlay {
    opacity: 1;
}

.work-zoom {
    font-size: 1.4rem;
    color: var(--acc);
    cursor: zoom-in;
}

.work-info {
    display: flex;
    gap: 20px;
    padding: 24px;
    border-top: 1px solid var(--border);
}

.work-index {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.75rem;
    color: var(--text-sub);
    padding-top: 4px;
    flex-shrink: 0;
}

.work-text h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.work-text p {
    font-size: 0.85rem;
    color: var(--text-sub);
    line-height: 1.6;
    margin-bottom: 12px;
}

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

.work-tags span {
    font-size: 0.72rem;
    padding: 3px 10px;
    border: 1px solid var(--border);
    border-radius: 50px;
    color: var(--text-sub);
}

/* =============================================
   PIPELINE
   ============================================= */
.pipeline-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.pipeline-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color 0.3s var(--ease);
}

.pipeline-card:hover {
    border-color: var(--border-h);
}

.pipeline-media {
    aspect-ratio: 16/9;
    overflow: hidden;
    position: relative;
    background: #0a0a0a;
}

.pipeline-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease);
    cursor: zoom-in;
}

.pipeline-card:hover .pipeline-img {
    transform: scale(1.04);
}

.pipeline-info {
    display: flex;
    gap: 20px;
    padding: 28px;
    align-items: flex-start;
}

.pipeline-num {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.75rem;
    color: var(--acc);
    padding-top: 4px;
    flex-shrink: 0;
    letter-spacing: 0.05em;
}

.pipeline-info h3 {
    font-size: 1.15rem;
    margin-bottom: 10px;
    letter-spacing: -0.01em;
}

.pipeline-info p {
    font-size: 0.88rem;
    color: var(--text-sub);
    line-height: 1.7;
}

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

.skill-block {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 40px;
}

.skill-block h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-sub);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 24px;
    font-family: 'Space Grotesk', sans-serif;
}

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

.skill-tags span {
    font-size: 0.88rem;
    padding: 7px 16px;
    border: 1px solid var(--border);
    border-radius: 50px;
    color: var(--text);
    transition: all 0.25s var(--ease);
    cursor: default;
}

.skill-tags span:hover {
    border-color: var(--acc);
    color: var(--acc);
    background: var(--acc-dim);
}

/* =============================================
   PROJECTS
   ============================================= */
.projects-list {
    display: flex;
    flex-direction: column;
}

.project-row {
    display: grid;
    grid-template-columns: 120px 1px 1fr;
    align-items: center;
    gap: 32px;
    padding: 32px 0 32px 24px;
    border-bottom: 1px solid var(--border);
    transition: background 0.3s;
}

.project-row:first-child {
    border-top: 1px solid var(--border);
}

.project-row:hover {
    background: rgba(255, 255, 255, 0.02);
}

.project-name {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.1rem;
    color: var(--acc);
    font-weight: 600;
    line-height: 1.4;
    min-height: 3em;
    display: flex;
    align-items: center;
}

.project-divider {
    background: var(--border);
    height: 100%;
    min-height: 40px;
    width: 1px;
}

.project-body h3 {
    font-size: 1.3rem;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
    transition: color 0.25s;
}

.project-row:hover .project-body h3 {
    color: var(--acc);
}

.project-body p {
    font-size: 0.9rem;
    color: var(--text-sub);
    line-height: 1.6;
}

/* =============================================
   ART
   ============================================= */
.art-content {
    display: flex;
    flex-direction: column;
    gap: 50px;
}

.art-text {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 720px;
}

.art-text p {
    font-size: 1.05rem;
    color: var(--text-sub);
    line-height: 1.8;
}

.art-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
}

.art-col {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 36px;
}

.art-col h4 {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--acc);
    margin-bottom: 20px;
    font-family: 'Space Grotesk', sans-serif;
}

.art-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.art-col li {
    font-size: 0.95rem;
    color: var(--text-sub);
    padding-left: 16px;
    position: relative;
}

.art-col li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: var(--border-h);
}

.art-col a {
    color: var(--text-sub);
    transition: color 0.25s;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: var(--border);
}

.art-col a:hover {
    color: var(--acc);
    text-decoration-color: var(--acc);
}

/* ---- ART SLIDER ---- */
.art-slider-wrap {
    margin: 40px 0;
    overflow: hidden;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    position: relative;
}

.art-slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(5, 5, 5, 0.7);
    backdrop-filter: blur(8px);
    color: var(--text);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.25s var(--ease);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.art-slider-arrow:hover {
    background: var(--acc);
    color: #000;
    border-color: var(--acc);
    transform: translateY(-50%) scale(1.1);
}

.art-slider-prev {
    left: 16px;
}

.art-slider-next {
    right: 16px;
}

.art-slider {
    display: flex;
    gap: 0;
    overflow-x: auto;

    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    cursor: grab;
}

.art-slider:active {
    cursor: grabbing;
}

.art-slider::-webkit-scrollbar {
    display: none;
}

.art-slide {
    flex: 0 0 70%;

    aspect-ratio: 16/9;
    overflow: hidden;
    background: #0a0a0a;
}

.art-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
    transition: transform 0.5s var(--ease);
}

.art-slide:hover img {
    transform: scale(1.03);
}

@media (max-width: 768px) {
    .art-slide {
        flex: 0 0 85%;
    }

    .art-slider-arrow {
        display: none;
    }
}

/* =============================================
   EDUCATION
   ============================================= */
.edu-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.edu-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: border-color 0.3s var(--ease);
}

.edu-card:hover {
    border-color: var(--border-h);
}

.edu-icon {
    font-size: 2rem;
}

.edu-card h3 {
    font-size: 1.3rem;
    letter-spacing: -0.02em;
}

.edu-card p {
    font-size: 0.9rem;
    color: var(--text-sub);
    line-height: 1.7;
    flex: 1;
}

.edu-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--acc);
    transition: opacity 0.25s;
    align-self: flex-start;
}

.edu-link:hover {
    opacity: 0.7;
}

/* =============================================
   FOOTER
   ============================================= */
.footer {
    background: var(--bg);
    border-top: 1px solid var(--border);
    padding: 100px 5% 60px;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-top {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 80px;
}

.footer-label {
    font-size: 0.78rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-sub);
}

.footer-title {
    font-size: clamp(2.5rem, 6vw, 5rem);
    letter-spacing: -0.04em;
    background: linear-gradient(135deg, #fff 50%, #333);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.footer-email {
    font-size: 1.2rem;
    color: var(--acc);
    font-weight: 500;
    border-bottom: 1px solid rgba(194, 255, 77, 0.3);
    padding-bottom: 4px;
    width: fit-content;
    transition: border-color 0.25s;
}

.footer-email:hover {
    border-color: var(--acc);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 60px;
}

.footer-links a {
    font-size: 0.88rem;
    padding: 10px 20px;
    border: none;
    border-radius: 50px;
    background: var(--acc);
    color: #000;
    font-weight: 500;
    transition: all 0.25s var(--ease);
}

.footer-links a:hover {
    opacity: 0.85;
    transform: translateY(-2px);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border);
    padding-top: 30px;
}

.footer-copy {
    font-size: 0.82rem;
    color: var(--text-sub);
}

/* =============================================
   LIGHTBOX
   ============================================= */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(12px);
}

.lightbox.active {
    display: flex;
}

.lb-close {
    position: fixed;
    top: 24px;
    right: 28px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-h);
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lb-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lb-inner {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    padding: 40px;
}

.lb-inner img,
.lb-inner video {
    max-width: 90vw;
    max-height: 88vh;
    object-fit: contain;
    border-radius: 8px;
    animation: lbIn 0.2s ease-out;
}

@keyframes lbIn {
    from {
        opacity: 0;
        transform: scale(0.96);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* =============================================
   ANIMATIONS
   ============================================= */
.reveal-up {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

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

/* =============================================
   RESPONSIVE
   ============================================= */

/* Tablet */
@media (max-width: 1024px) {
    .works-grid {
        grid-template-columns: 1fr 1fr;
    }

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

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

/* Mobile menu scroll lock */
html.menu-open,
html.menu-open body {
    overflow: hidden;
    height: 100%;
}

html.menu-open .nav {
    backdrop-filter: none;
}

/* Mobile */
@media (max-width: 768px) {

    /* --- NAV --- */
    .nav-inner {
        padding: 16px 5%;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: fixed;
        inset: 0;
        background: rgba(5, 5, 5, 0.97);
        justify-content: center;
        align-items: center;
        gap: 32px;
        z-index: 550;
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links a {
        font-size: 1.5rem;
        color: var(--text);
    }

    .nav-burger {
        display: flex;
    }

    .nav-cta {
        display: none;
    }

    /* --- HERO --- */
    .hero {
        padding: 100px 5% 60px;
    }

    .hero-bg-video {
        display: none;
    }

    .hero::before {
        display: none;
    }

    /* убираем сетку на мобиле */
    .hero-top {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 28px;
    }

    .hero-photo-ring {
        width: 64px;
        height: 64px;
    }

    .hero-name {
        font-size: clamp(2.8rem, 12vw, 4rem);
        margin-bottom: 24px;
        letter-spacing: -0.03em;
    }

    .hero-meta {
        margin-bottom: 28px;
        gap: 10px;
    }

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

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

    /* Stats — 2 в ряд */
    .hero-stats {
        display: grid;
        grid-template-columns: 1fr 1fr;
        border: 1px solid var(--border);
        border-radius: var(--radius);
        overflow: hidden;
        width: 100%;
        margin-bottom: 32px;
    }

    .stat {
        padding: 16px;
        border-right: 1px solid var(--border);
        border-bottom: 1px solid var(--border);
        border-radius: 0;
        margin: 0;
    }

    .stat:nth-child(2n) {
        border-right: none;
    }

    .stat:nth-last-child(-n+2) {
        border-bottom: none;
    }

    .stat-num {
        font-size: 1.6rem;
    }

    .stat-sep {
        display: none;
    }

    .hero-actions {
        flex-direction: column;
        gap: 12px;
    }

    .btn-primary {
        width: 100%;
        text-align: center;
        padding: 14px;
    }

    .btn-ghost {
        display: none;
    }

    .hero-scroll-hint {
        display: none;
    }

    /* --- SECTIONS --- */
    .section {
        padding: 70px 5%;
    }

    .section-title {
        font-size: clamp(2rem, 8vw, 2.8rem);
        margin-bottom: 14px;
    }

    .section-sub {
        font-size: 0.92rem;
        margin-bottom: 40px;
    }

    /* --- GRIDS --- */
    .works-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .work-card {
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    .work-card+.work-card {
        border-top: none;
    }

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

    .skills-wrap {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .skill-block {
        border-radius: 0;
    }

    .art-cols {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .art-col {
        border-radius: 0;
    }

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

    .cases-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    /* --- PROJECTS --- */
    .project-row {
        grid-template-columns: 100px 1px 1fr;
        gap: 16px;
        padding: 20px 0 20px 16px;
    }

    .project-body h3 {
        font-size: 1.1rem;
    }

    /* --- FOOTER --- */
    .footer {
        padding: 60px 5% 40px;
    }

    .footer-top {
        margin-bottom: 40px;
    }

    .footer-title {
        font-size: clamp(1.8rem, 8vw, 2.5rem);
    }

    .footer-email {
        font-size: 1rem;
    }

    .footer-links {
        gap: 8px;
    }

    .footer-links a {
        font-size: 0.8rem;
        padding: 8px 14px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    /* --- CASE PANEL --- */
    .case-panel {
        width: 100%;
        border-left: none;
        border-top: 1px solid var(--border);
    }

    .case-panel-header {
        padding: 14px 20px;
    }

    .cp-content {
        padding: 24px 20px;
    }

    .cp-flow {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .cp-flow-arrow {
        transform: rotate(90deg);
    }

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

    .cp-stat-num {
        font-size: 1.4rem;
    }
}

/* Extra small */
@media (max-width: 390px) {
    .hero-name {
        font-size: 2.4rem;
    }

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

    .cases-grid {
        gap: 8px;
    }
}

/* =============================================
   CASES SECTION
   ============================================= */
.cases-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

@media (max-width: 768px) {
    .cases-grid {
        grid-template-columns: 1fr !important;
        gap: 12px;
    }
    .case-stub {
        display: none !important;
    }
}

.case-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
    position: relative;
}

.case-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--acc);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s var(--ease);
}

.case-card:hover {
    border-color: var(--border-h);
    transform: translateY(-4px);
}

.case-card:hover::after {
    transform: scaleX(1);
}

.case-card[data-case="coming"] {
    cursor: default;
    opacity: 0.5;
}

.case-card[data-case="coming"]:hover {
    transform: none;
}

.case-card[data-case="coming"]::after {
    display: none;
}

.case-hero {
    aspect-ratio: 5/4;
    position: relative;
    overflow: hidden;
}

.case-hero-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0e0e0e 0%, #161616 100%);
    border-bottom: 1px solid var(--border);
}

.case-hero-dim {
    background: #0a0a0a;
}

.case-hero-icon {
    font-size: 3.5rem;
    filter: grayscale(0.3);
}

.case-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease);
}

.case-card:hover .case-hero img {
    transform: scale(1.04);
}

.case-category {
    position: absolute;
    bottom: 12px;
    left: 12px;
    font-size: 0.7rem;
    color: var(--text-sub);
    background: rgba(0, 0, 0, 0.7);
    padding: 4px 10px;
    border-radius: 50px;
    border: 1px solid var(--border);
    backdrop-filter: blur(8px);
    letter-spacing: 0.03em;
}

.case-body {
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.case-body h3 {
    font-size: 1.1rem;
    letter-spacing: -0.02em;
}

.case-body p {
    font-size: 0.85rem;
    color: var(--text-sub);
    line-height: 1.6;
    flex: 1;
}

.case-footer {
    padding-top: 10px;
    border-top: 1px solid var(--border);
    margin-top: 4px;
}

.case-open {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--acc);
    letter-spacing: 0.02em;
}

.case-open-dim {
    color: var(--text-sub);
}

/* =============================================
   CASE PANEL (slide-in overlay)
   ============================================= */
.case-panel-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 800;
    backdrop-filter: blur(6px);
}

.case-panel-overlay.active {
    display: block;
}

.case-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: min(800px, 90vw);
    height: 100vh;
    background: #0d0d0d;
    border-left: 1px solid var(--border);
    z-index: 900;
    transform: translateX(100%);
    transition: transform 0.5s var(--ease);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.case-panel.active {
    transform: translateX(0);
}

.case-panel-header {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 20px 30px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.case-panel-close {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-sub);
    font-size: 0.85rem;
    padding: 8px 18px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.25s var(--ease);
    font-family: 'Inter', sans-serif;
}

.case-panel-close:hover {
    border-color: var(--text);
    color: var(--text);
}

.case-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

/* Panel content styles */
.cp-hero {
    width: 100%;
    aspect-ratio: 16/7;
    overflow: hidden;
}

.cp-hero-bg {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0e0e0e 0%, #1a1a1a 100%);
    border-bottom: 1px solid var(--border);
}

.cp-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cp-content {
    padding: 40px;
}

.cp-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.cp-tag {
    font-size: 0.75rem;
    padding: 4px 12px;
    border: 1px solid rgba(194, 255, 77, 0.25);
    border-radius: 50px;
    color: var(--acc);
    background: var(--acc-dim);
}

.cp-title {
    font-size: clamp(1.8rem, 3vw, 2.8rem);
    letter-spacing: -0.03em;
    margin-bottom: 16px;
}

.cp-lead {
    font-size: 1.05rem;
    color: var(--text-sub);
    line-height: 1.7;
    margin-bottom: 40px;
}

.cp-section {
    margin-bottom: 36px;
}

.cp-section h3 {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-sub);
    margin-bottom: 16px;
    font-family: 'Space Grotesk', sans-serif;
}

.cp-section p {
    font-size: 0.95rem;
    color: var(--text-sub);
    line-height: 1.8;
}

.cp-section ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
}

.cp-section li {
    font-size: 0.9rem;
    color: var(--text-sub);
    padding-left: 20px;
    position: relative;
    line-height: 1.6;
}

.cp-section li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--acc);
    font-size: 0.8rem;
}

.cp-diagram {
    margin-top: 16px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.cp-diagram img {
    width: 100%;
    height: auto;
    display: block;
}

.cp-flow {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.cp-flow-step {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 0.82rem;
    text-align: center;
    line-height: 1.4;
}

.cp-flow-step small {
    display: block;
    color: var(--text-sub);
    font-size: 0.72rem;
    margin-top: 2px;
}

.cp-flow-arrow {
    color: var(--acc);
    font-size: 1rem;
    flex-shrink: 0;
}

.cp-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2px;
    margin-bottom: 36px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.cp-stat {
    padding: 20px;
    background: var(--bg-card);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cp-stat-num {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--acc);
    line-height: 1;
}

.cp-stat-label {
    font-size: 0.72rem;
    color: var(--text-sub);
    line-height: 1.4;
}

.cp-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.cp-tags span {
    font-size: 0.85rem;
    padding: 6px 14px;
    border: 1px solid var(--border);
    border-radius: 50px;
    color: var(--text);
    transition: all 0.25s var(--ease);
}

.cp-tags span:hover {
    border-color: var(--acc);
    color: var(--acc);
    background: var(--acc-dim);
}




/* =============================================
   LIGHTBOX
   ============================================= */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 1000;
    backdrop-filter: blur(10px);
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lb-inner {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 20px;
    max-width: 90vw;
    max-height: 90vh;
}

.lb-close {
    align-self: flex-end;
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 0.85rem;
    padding: 8px 18px;
    border-radius: 50px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: all 0.25s;
}

.lb-close:hover {
    border-color: #fff;
}