/* ═══════════════════════════════════════════════════════
   ZMIENNE
═══════════════════════════════════════════════════════ */
:root {
    --bg:          #080808;
    --surface:     #0f0f0f;
    --surface-2:   #161616;
    --accent:      #BF5FFF;
    --accent-dim:  rgba(191, 95, 255, 0.12);
    --accent-glow: rgba(191, 95, 255, 0.35);
    --text:        #E2E2E2;
    --muted:       #6a6a6a;
    --border:      rgba(255, 255, 255, 0.07);

    --ff-display: 'Bebas Neue', sans-serif;
    --ff-body:    'Rajdhani', sans-serif;
    --ff-mono:    'Space Mono', monospace;

    --nav-h:     72px;
    --max-w:     1240px;
    --pad:       0 24px;
    --section-v: 120px;

    --ease:    cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --ease-io: cubic-bezier(0.645, 0.045, 0.355, 1);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-h);
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--ff-body);
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
    cursor: none;
}

::selection { background: var(--accent); color: #fff; }

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

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

/* ═══════════════════════════════════════════════════════
   CUSTOM CURSOR
═══════════════════════════════════════════════════════ */
.cursor,
.cursor-follower {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transition: opacity 0.3s;
}

.cursor {
    width: 8px;
    height: 8px;
    background: var(--accent);
    transform: translate(-50%, -50%);
    transition: transform 0.1s, background 0.2s, width 0.2s, height 0.2s;
}

.cursor-follower {
    width: 36px;
    height: 36px;
    border: 1px solid rgba(191, 95, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: transform 0.12s var(--ease), width 0.3s, height 0.3s, border-color 0.3s;
}

body.cursor-hover .cursor {
    width: 12px;
    height: 12px;
    background: #fff;
}

body.cursor-hover .cursor-follower {
    width: 52px;
    height: 52px;
    border-color: var(--accent);
    box-shadow: 0 0 20px var(--accent-glow);
}

@media (pointer: coarse) {
    .cursor, .cursor-follower { display: none; }
    body { cursor: auto; }
}

/* ═══════════════════════════════════════════════════════
   UTILITIES
═══════════════════════════════════════════════════════ */
.container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: var(--pad);
}

.section { padding: var(--section-v) 0; }

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

.section__label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--ff-mono);
    font-size: 11px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 20px;
}

.section__label::before {
    content: '';
    display: block;
    width: 16px;
    height: 1px;
    background: var(--accent);
    flex-shrink: 0;
}

.section__heading {
    font-family: var(--ff-display);
    font-size: clamp(38px, 5.5vw, 68px);
    line-height: 1.0;
    letter-spacing: 0.03em;
}

.section__header { margin-bottom: 64px; }

/* ═══════════════════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════════════════ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 36px;
    font-family: var(--ff-body);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    border: none;
    cursor: none;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s var(--ease), box-shadow 0.3s;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.06);
    opacity: 0;
    transition: opacity 0.3s;
}

.btn:hover::after { opacity: 1; }

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

.btn--primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 40px var(--accent-glow), 0 2px 12px rgba(0,0,0,0.4);
}

.btn--ghost {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}

.btn--ghost:hover {
    border-color: rgba(191,95,255,0.5);
    color: var(--accent);
    transform: translateY(-3px);
}

.btn--block { width: 100%; }

/* ═══════════════════════════════════════════════════════
   NAVIGATION
═══════════════════════════════════════════════════════ */
.nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 500;
    height: var(--nav-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 48px;
    transition: background 0.4s, border-color 0.4s, backdrop-filter 0.4s;
}

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

/* Gdy menu mobilne jest otwarte, backdrop-filter tworzyłby nowy containing block
   dla position:fixed dzieci — menu zamiast pokrywać viewport, kurczyłoby się
   do wysokości belki. Usuwamy go na czas otwarcia menu. */
.nav.menu-open {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.nav__logo {
    font-family: var(--ff-display);
    font-size: 30px;
    letter-spacing: 0.04em;
    line-height: 1;
    z-index: 1;
}

.nav__menu {
    display: flex;
    list-style: none;
    gap: 44px;
}

.nav__link {
    font-family: var(--ff-body);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    position: relative;
    padding-bottom: 2px;
    transition: color 0.3s;
}

.nav__link::after {
    content: '';
    position: absolute;
    bottom: -2px; left: 0;
    width: 0; height: 1px;
    background: var(--accent);
    transition: width 0.35s var(--ease);
}

.nav__link:hover,
.nav__link.active { color: var(--text); }

.nav__link:hover::after,
.nav__link.active::after { width: 100%; }

.nav__burger {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: none;
    padding: 6px;
    z-index: 1;
}

.nav__burger span {
    display: block;
    width: 26px;
    height: 1.5px;
    background: var(--text);
    transition: transform 0.35s var(--ease-io), opacity 0.3s;
    transform-origin: center;
}

/* ═══════════════════════════════════════════════════════
   HERO
═══════════════════════════════════════════════════════ */
.hero {
    position: relative;
    height: 100vh;
    min-height: 640px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero__canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* Noise/grain texture */
.hero__noise {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 1;
    mix-blend-mode: overlay;
}

/* Vignette darkens edges */
.hero__vignette {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 40%, rgba(8,8,8,0.85) 100%);
    z-index: 2;
    pointer-events: none;
}

.hero__content {
    position: relative;
    z-index: 3;
    text-align: center;
    padding: 0 24px;
}

.hero__eyebrow {
    font-family: var(--ff-mono);
    font-size: 13px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 28px;
    opacity: 0;
    animation: fadeUp 0.9s var(--ease) 0.4s forwards;
    text-shadow: 0 0 20px var(--accent-glow), 0 0 40px rgba(191, 95, 255, 0.2);
}

.hero__name {
    display: flex;
    flex-direction: column;
    font-family: var(--ff-display);
    font-size: clamp(80px, 14vw, 190px);
    line-height: 0.88;
    letter-spacing: 0.04em;
    margin-bottom: 28px;
}

.hero__name-line {
    display: block;
    opacity: 0;
    animation: fadeUp 0.9s var(--ease) 0.6s forwards;
}

.hero__name-accent {
    color: var(--accent);
    text-shadow:
        0 0 40px rgba(191,95,255,0.45),
        0 0 90px rgba(191,95,255,0.18);
    animation-delay: 0.75s;
}

.hero__tags {
    font-family: var(--ff-mono);
    font-size: 11px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 44px;
    opacity: 0;
    animation: fadeUp 0.9s var(--ease) 0.95s forwards;
}

.hero__tags .sep {
    color: var(--accent);
    margin: 0 14px;
    opacity: 0.6;
}

.hero__cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    opacity: 0;
    animation: fadeUp 0.9s var(--ease) 1.1s forwards;
}

/* Scroll indicator */
.hero__scroll {
    position: absolute;
    bottom: 44px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    opacity: 0;
    animation: fadeIn 1s var(--ease) 1.6s forwards;
}

.hero__scroll-label {
    font-family: var(--ff-mono);
    font-size: 9px;
    letter-spacing: 0.3em;
    color: var(--muted);
}

.hero__scroll-track {
    width: 1px;
    height: 52px;
    background: var(--border);
    position: relative;
    overflow: hidden;
}

.hero__scroll-thumb {
    position: absolute;
    top: -100%;
    width: 100%;
    height: 40%;
    background: var(--accent);
    animation: scrollDrop 1.6s ease-in-out infinite;
}

@keyframes scrollDrop {
    0%   { top: -40%; }
    100% { top: 110%; }
}

/* ── Glitch text effect ── */
.glitch,
.glitch-accent {
    position: relative;
    display: inline-block;
}

.glitch::before,
.glitch::after,
.glitch-accent::before,
.glitch-accent::after {
    content: attr(data-text);
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    font-family: inherit;
    font-size: inherit;
    color: inherit;
}

.glitch::before {
    left: 3px;
    text-shadow: -3px 0 var(--accent);
    clip-path: polygon(0 28%, 100% 28%, 100% 46%, 0 46%);
    animation: glitchA 5s infinite;
}
.glitch::after {
    left: -3px;
    text-shadow: 3px 0 rgba(255,0,200,0.7);
    clip-path: polygon(0 66%, 100% 66%, 100% 76%, 0 76%);
    animation: glitchB 5s infinite;
}
.glitch-accent::before {
    left: 3px;
    text-shadow: -3px 0 rgba(255,255,255,0.7);
    clip-path: polygon(0 28%, 100% 28%, 100% 46%, 0 46%);
    animation: glitchA 5s infinite 0.2s;
}
.glitch-accent::after {
    left: -3px;
    text-shadow: 3px 0 rgba(255,0,200,0.7);
    clip-path: polygon(0 66%, 100% 66%, 100% 76%, 0 76%);
    animation: glitchB 5s infinite 0.2s;
}

@keyframes glitchA {
    0%,82%,100% { transform: none; opacity: 1; }
    83%  { transform: translateX(-5px); opacity: 0.85; }
    84%  { transform: translateX(5px); }
    85%  { transform: translateX(-2px); opacity: 1; }
    86%  { transform: none; }
    87%  { transform: translateX(4px); }
    88%  { transform: none; }
}
@keyframes glitchB {
    0%,82%,100% { transform: none; opacity: 1; }
    84%  { transform: translateX(5px); opacity: 0.85; }
    85%  { transform: translateX(-5px); }
    86%  { transform: translateX(2px); opacity: 1; }
    87%  { transform: none; }
    88%  { transform: translateX(-4px); }
    89%  { transform: none; }
}

/* ═══════════════════════════════════════════════════════
   REVEAL ANIMATIONS (Intersection Observer)
═══════════════════════════════════════════════════════ */
.reveal,
.reveal-left,
.reveal-right {
    opacity: 0;
    transition: opacity 0.85s var(--ease), transform 0.85s var(--ease);
}

.reveal        { transform: translateY(36px); }
.reveal-left   { transform: translateX(-36px); }
.reveal-right  { transform: translateX(36px); }

.reveal.visible,
.reveal-left.visible,
.reveal-right.visible {
    opacity: 1;
    transform: none;
}

/* ═══════════════════════════════════════════════════════
   ABOUT
═══════════════════════════════════════════════════════ */
.about {
    background: var(--surface);
    position: relative;
}

.about::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--accent) 50%, transparent 100%);
    opacity: 0.3;
}

.about__grid {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 88px;
    align-items: start;
}

/* Photo frame */
.about__photo-frame {
    position: relative;
    aspect-ratio: 3 / 4;
    max-height: 500px;
}

.about__photo-inner {
    width: 100%;
    height: 100%;
    background: var(--surface-2);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.about__photo-icon {
    width: 72px;
    height: 72px;
    color: var(--accent);
    opacity: 0.4;
}

.about__photo-label {
    font-family: var(--ff-mono);
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--muted);
}

.about__photo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
    filter: grayscale(15%) contrast(1.05);
    transition: filter 0.4s;
}

.about__photo-frame:hover .about__photo-img {
    filter: grayscale(0%) contrast(1.08);
}

/* Corner brackets */
.about__photo-corner {
    position: absolute;
    width: 20px;
    height: 20px;
    border-color: var(--accent);
    border-style: solid;
    opacity: 0.5;
}
.about__photo-corner--tl { top: -6px;    left: -6px;    border-width: 1px 0 0 1px; }
.about__photo-corner--tr { top: -6px;    right: -6px;   border-width: 1px 1px 0 0; }
.about__photo-corner--bl { bottom: -6px; left: -6px;    border-width: 0 0 1px 1px; }
.about__photo-corner--br { bottom: -6px; right: -6px;   border-width: 0 1px 1px 0; }

/* Stats row */
.about__stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin-top: 20px;
    border: 1px solid var(--border);
}

.stat {
    padding: 22px 12px;
    text-align: center;
    border-right: 1px solid var(--border);
}

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

.stat__value {
    font-family: var(--ff-display);
    font-size: 44px;
    line-height: 1;
    margin-bottom: 6px;
}

.stat__label {
    font-family: var(--ff-mono);
    font-size: 9px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
}

/* About text column */
.about__bio {
    color: var(--muted);
    font-size: 16px;
    line-height: 1.85;
    margin-bottom: 22px;
}

.about__tools {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 36px;
}

.tool-tag {
    font-family: var(--ff-mono);
    font-size: 10px;
    letter-spacing: 0.1em;
    padding: 7px 16px;
    border: 1px solid var(--border);
    color: var(--muted);
    transition: border-color 0.3s, color 0.3s;
    cursor: none;
}

.tool-tag:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ═══════════════════════════════════════════════════════
   PORTFOLIO
═══════════════════════════════════════════════════════ */
.portfolio { background: var(--bg); }

/* Showreel featured block */
.showreel {
    position: relative;
    aspect-ratio: 16 / 9;
    max-height: 560px;
    margin-bottom: 56px;
    overflow: hidden;
    cursor: none;
}

.showreel__bg {
    position: absolute;
    inset: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    transition: border-color 0.4s;
}

.showreel:hover .showreel__bg {
    border-color: rgba(191, 95, 255, 0.4);
}

.showreel__video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
}

.showreel__cover {
    position: absolute;
    inset: 0;
    z-index: 2;
    transition: opacity 0.5s;
    background: rgba(8, 8, 8, 0.55);
}

.showreel__cover.hidden {
    opacity: 0;
    pointer-events: none;
}

.showreel__play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 88px;
    height: 88px;
    border-radius: 50%;
    border: 1.5px solid var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    transition: background 0.3s, box-shadow 0.3s, transform 0.3s;
    z-index: 2;
}

.showreel__play svg {
    width: 30px;
    height: 30px;
    fill: currentColor;
    margin-left: 4px;
}

.showreel:hover .showreel__play {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 0 50px var(--accent-glow);
    transform: translate(-50%, -50%) scale(1.08);
}

.showreel__meta {
    position: absolute;
    bottom: 28px;
    left: 28px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.showreel__title {
    font-family: var(--ff-mono);
    font-size: 11px;
    letter-spacing: 0.22em;
    color: var(--accent);
}

.showreel__dur {
    font-family: var(--ff-mono);
    font-size: 10px;
    color: var(--muted);
}

/* Animated border on showreel hover */
.showreel__border-anim {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 3;
}

.showreel__border-anim::before,
.showreel__border-anim::after {
    content: '';
    position: absolute;
    background: var(--accent);
    opacity: 0;
    transition: opacity 0.4s;
}

.showreel__border-anim::before {
    top: 0; left: 0; right: 0;
    height: 1px;
}

.showreel__border-anim::after {
    bottom: 0; left: 0; right: 0;
    height: 1px;
}

.showreel:hover .showreel__border-anim::before,
.showreel:hover .showreel__border-anim::after {
    opacity: 0.5;
}

/* Filter buttons */
.portfolio__filters {
    display: flex;
    gap: 8px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 9px 22px;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--muted);
    font-family: var(--ff-body);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: none;
    transition: border-color 0.3s, color 0.3s, background 0.3s;
}

.filter-btn:hover,
.filter-btn.active {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-dim);
}

/* Project grid */
.portfolio__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.project-card {
    background: var(--surface);
    border: 1px solid var(--border);
    transition: border-color 0.35s, transform 0.35s var(--ease), box-shadow 0.35s, z-index 0s;
    cursor: none;
    position: relative;
    z-index: 0;
}

.project-card:hover {
    border-color: rgba(191, 95, 255, 0.35);
    transform: translateY(-6px);
    z-index: 2;
    box-shadow: 0 0 80px 28px rgba(0, 0, 0, 0.92);
}


.project-card.hidden {
    display: none;
}

.project-card__thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.project-card__placeholder {
    width: 100%;
    height: 100%;
    background: var(--surface-2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.5s var(--ease);
}

.project-card:hover .project-card__img {
    transform: scale(1.04);
}

.project-card__overlay--soon {
    background: rgba(8, 8, 8, 0.6);
    font-size: 10px;
}

/* Karta z wideo */
.project-card__video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.project-card__video-cover {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(8, 8, 8, 0.45);
    transition: opacity 0.35s;
    cursor: none;
}

.project-card__video-cover.hidden {
    opacity: 0;
    pointer-events: none;
}

.project-card__play-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: 14px;
    transition: border-color 0.3s, color 0.3s, box-shadow 0.3s;
}

.project-card:hover .project-card__play-icon {
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 0 24px var(--accent-glow);
}

.project-card__cat {
    position: absolute;
    top: 12px;
    left: 12px;
    font-family: var(--ff-mono);
    font-size: 9px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent);
    background: rgba(8, 8, 8, 0.85);
    padding: 4px 10px;
    backdrop-filter: blur(8px);
}

.project-card__overlay {
    position: absolute;
    inset: 0;
    background: rgba(191, 95, 255, 0.07);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--ff-mono);
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent);
    opacity: 0;
    transition: opacity 0.35s;
}

.project-card:hover .project-card__overlay {
    opacity: 1;
}

.project-card__body {
    padding: 22px 24px;
}

.project-card__title {
    font-family: var(--ff-display);
    font-size: 24px;
    letter-spacing: 0.04em;
    margin-bottom: 8px;
}

.project-card__desc {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.75;
    margin-bottom: 16px;
}

.project-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.project-card__tags span {
    font-family: var(--ff-mono);
    font-size: 9px;
    letter-spacing: 0.08em;
    color: var(--muted);
    border: 1px solid var(--border);
    padding: 3px 10px;
    transition: border-color 0.3s, color 0.3s;
}

.project-card:hover .project-card__tags span {
    border-color: rgba(191,95,255,0.2);
    color: rgba(226,226,226,0.7);
}

/* ── Hive Mind — karta wyróżniona ── */
.project-featured {
    grid-column: 1 / -1;   /* rozciąga się przez całą szerokość gridu */
    border-color: rgba(191, 95, 255, 0.18);
}

.project-featured:hover {
    border-color: rgba(191, 95, 255, 0.45);
    transform: none;        /* wyłącz unoszenie — karta jest za duża */
}

.project-featured__inner {
    display: grid;
    grid-template-columns: 1fr 380px;
    min-height: 380px;
}

.project-featured__media {
    position: relative;
    background: #000;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.project-featured__video,
.project-featured__art {
    width: 100%;
    flex: 1;
    min-height: 0;
    object-fit: cover;
    display: block;
}

.project-featured__video[hidden],
.project-featured__art[hidden] {
    display: none;
}

/* Zakładki przełączające wideo — pod kontrolkami odtwarzania */
.video-switcher {
    display: flex;
    background: rgba(8, 8, 8, 0.95);
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}

.video-tab.active {
    border-bottom: none;
    border-top: 2px solid var(--accent);
}

.video-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 10px 8px;
    background: transparent;
    border: none;
    border-right: 1px solid var(--border);
    color: var(--muted);
    cursor: none;
    transition: background 0.25s, color 0.25s;
}

.video-tab:last-child { border-right: none; }

.video-tab:hover {
    background: var(--accent-dim);
    color: var(--text);
}

.video-tab.active {
    background: var(--accent-dim);
    color: var(--accent);
    border-bottom: 2px solid var(--accent);
}

.video-tab__num {
    font-family: var(--ff-display);
    font-size: 22px;
    line-height: 1;
}

.video-tab__label {
    font-family: var(--ff-mono);
    font-size: 9px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

/* Info po prawej stronie */
.project-featured__info {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 36px 32px;
    border-left: 1px solid var(--border);
}

.project-featured__title {
    font-family: var(--ff-display);
    font-size: 48px;
    letter-spacing: 0.04em;
    line-height: 1;
}

.project-featured__desc {
    font-size: 15px;
    color: var(--muted);
    line-height: 1.8;
    flex: 1;
}

.project-featured__download {
    margin-top: auto;
    align-self: flex-start;
}

@media (max-width: 900px) {
    .project-featured__inner {
        grid-template-columns: 1fr;
    }
    .project-featured__media {
        aspect-ratio: auto;
    }
    .project-featured__video {
        flex: none;
        aspect-ratio: 16 / 9;
        height: auto;
    }
    .project-featured__info {
        border-left: none;
        border-top: 1px solid var(--border);
    }
}

/* ═══════════════════════════════════════════════════════
   SERVICES
═══════════════════════════════════════════════════════ */
.services {
    background: var(--surface);
    position: relative;
}

.services::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--accent) 50%, transparent 100%);
    opacity: 0.3;
}

.services__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    border: 1px solid var(--border);
}

.service-card {
    padding: 52px 48px;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    transition: background 0.4s;
    cursor: none;
}

.service-card:hover {
    background: rgba(191, 95, 255, 0.04);
}

.service-card:nth-child(even)  { border-right: none; }
.service-card:nth-child(3),
.service-card:nth-child(4)     { border-bottom: none; }

/* Large background number */
.service-card__num {
    position: absolute;
    top: 40px;
    right: 40px;
    font-family: var(--ff-display);
    font-size: 96px;
    line-height: 1;
    color: var(--border);
    pointer-events: none;
    transition: color 0.4s;
}

.service-card:hover .service-card__num {
    color: rgba(191, 95, 255, 0.06);
}

.service-card__icon {
    width: 44px;
    height: 44px;
    color: var(--accent);
    margin-bottom: 20px;
}

.service-card__title {
    font-family: var(--ff-display);
    font-size: 34px;
    line-height: 1.08;
    letter-spacing: 0.04em;
    margin-bottom: 18px;
}

.service-card__desc {
    font-size: 15px;
    color: var(--muted);
    line-height: 1.8;
    margin-bottom: 28px;
    max-width: 380px;
}

.service-card__list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.service-card__list li {
    font-family: var(--ff-mono);
    font-size: 11px;
    letter-spacing: 0.08em;
    color: var(--muted);
    padding-left: 18px;
    position: relative;
}

.service-card__list li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: var(--accent);
}

/* ═══════════════════════════════════════════════════════
   CONTACT
═══════════════════════════════════════════════════════ */
.contact { background: var(--bg); }

.contact__grid {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: 80px;
    align-items: start;
}

.contact__intro {
    font-size: 17px;
    color: var(--muted);
    line-height: 1.8;
    margin-bottom: 44px;
}

.contact__details {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 44px;
}

.contact__detail {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.contact__detail-label {
    font-family: var(--ff-mono);
    font-size: 9px;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--accent);
}

.contact__detail-value {
    font-size: 16px;
    color: var(--text);
    transition: color 0.3s;
}

.contact__detail-value:hover { color: var(--accent); }

.contact__social {
    display: flex;
    gap: 10px;
}

.social-btn {
    width: 42px;
    height: 42px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--ff-mono);
    font-size: 10px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--muted);
    transition: border-color 0.3s, color 0.3s, box-shadow 0.3s;
    cursor: none;
}

.social-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 0 20px rgba(191, 95, 255, 0.2);
}

/* Form */
.contact__form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

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

.form-label {
    font-family: var(--ff-mono);
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--muted);
}

.form-input {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 15px 20px;
    font-family: var(--ff-body);
    font-size: 15px;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
    -webkit-appearance: none;
    appearance: none;
}

.form-input::placeholder { color: rgba(255,255,255,0.12); }

.form-input:focus {
    border-color: rgba(191, 95, 255, 0.6);
    box-shadow: 0 0 0 3px rgba(191, 95, 255, 0.08);
}

.form-select {
    cursor: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'%3E%3Cpath d='M1 1l5 4.5L11 1' stroke='%236a6a6a' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 18px center;
    padding-right: 44px;
}

.form-select option {
    background: var(--surface);
    color: var(--text);
}

.form-textarea {
    resize: vertical;
    min-height: 148px;
    line-height: 1.65;
}

/* ═══════════════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════════════ */
.footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 30px 0;
}

.footer__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.footer__logo {
    font-family: var(--ff-display);
    font-size: 26px;
    letter-spacing: 0.04em;
}

.footer__copy {
    font-family: var(--ff-mono);
    font-size: 10px;
    letter-spacing: 0.1em;
    color: var(--muted);
}

.footer__links {
    display: flex;
    gap: 24px;
}

.footer__links a {
    font-family: var(--ff-mono);
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    transition: color 0.3s;
    cursor: none;
}

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

.footer__linkedin {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    color: var(--muted);
    transition: color 0.3s, transform 0.3s;
}

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

.footer__linkedin svg {
    display: block;
}

/* ═══════════════════════════════════════════════════════
   CARD MODAL — powiększenie po dwukliku
═══════════════════════════════════════════════════════ */
.card-modal {
    position: fixed;
    inset: 0;
    z-index: 800;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s;
}

.card-modal.open {
    opacity: 1;
    pointer-events: all;
}

.card-modal__inner {
    position: relative;
    width: 100%;
    max-width: 880px;
    max-height: 88vh;
    background: var(--surface);
    border: 1px solid rgba(191, 95, 255, 0.35);
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow: hidden;
    transform: scale(0.94) translateY(20px);
    transition: transform 0.35s var(--ease);
    box-shadow: 0 0 80px rgba(191, 95, 255, 0.15);
}

.card-modal.open .card-modal__inner {
    transform: scale(1) translateY(0);
}

.card-modal__close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    cursor: none;
    z-index: 10;
    transition: border-color 0.3s, color 0.3s;
}

.card-modal__close:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.card-modal__media {
    overflow: hidden;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    background: #000;
}

.card-modal__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    flex: 1;
}

.card-modal__video,
.card-modal__art {
    width: 100%;
    flex: 1;
    object-fit: contain;
    background: #000;
    display: block;
    min-height: 0;
}

/* ── Zakładki wideo w modalu (Hive Mind) ── */
.vid-modal-tabs {
    display: flex;
    background: rgba(10, 10, 10, 0.95);
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}

.vid-modal-tab {
    flex: 1;
    padding: 8px 4px;
    background: transparent;
    border: none;
    border-right: 1px solid var(--border);
    color: var(--muted);
    font-family: var(--ff-display);
    font-size: 20px;
    cursor: none;
    transition: background 0.2s, color 0.2s;
}

.vid-modal-tab:last-child { border-right: none; }

.vid-modal-tab:hover {
    background: var(--accent-dim);
    color: var(--text);
}

.vid-modal-tab.active {
    color: var(--accent);
    background: var(--accent-dim);
    border-bottom: 2px solid var(--accent);
}

/* ── Własny pasek kontrolek wideo ── */
.vid-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: rgba(15, 15, 15, 0.95);
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}

.vid-btn {
    background: none;
    border: none;
    color: var(--muted);
    cursor: none;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    flex-shrink: 0;
}

.vid-btn:hover { color: var(--accent); }

.vid-btn svg {
    width: 16px;
    height: 16px;
    display: block;
}

.vid-progress {
    flex: 1;
}

.vid-volume-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.vid-vol { width: 72px; }

/* Range input — cross-browser */
.vid-progress,
.vid-vol {
    -webkit-appearance: none;
    appearance: none;
    height: 3px;
    background: rgba(255,255,255,0.12);
    outline: none;
    cursor: none;
    border-radius: 0;
    transition: background 0.2s;
}

.vid-progress:hover,
.vid-vol:hover {
    background: rgba(255,255,255,0.2);
}

.vid-progress::-webkit-slider-thumb,
.vid-vol::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 11px;
    height: 11px;
    background: var(--accent);
    border-radius: 50%;
    cursor: none;
    box-shadow: 0 0 6px var(--accent-glow);
}

.vid-progress::-moz-range-thumb,
.vid-vol::-moz-range-thumb {
    width: 11px;
    height: 11px;
    background: var(--accent);
    border: none;
    border-radius: 50%;
    cursor: none;
}

.card-modal__no-media {
    width: 100%;
    height: 100%;
    background: var(--surface-2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: 48px;
}

.card-modal__body {
    padding: 40px 32px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow-y: auto;
}

.card-modal__title {
    font-family: var(--ff-display);
    font-size: 36px;
    letter-spacing: 0.04em;
    line-height: 1.05;
}

.card-modal__desc {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.9;
    flex: 1;
}

.card-modal__hint {
    font-family: var(--ff-mono);
    font-size: 9px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--muted);
    opacity: 0.5;
    margin-top: auto;
}

@media (max-width: 640px) {
    .card-modal__inner { grid-template-columns: 1fr; }
    .card-modal__media { min-height: 200px; max-height: 220px; }
}

/* ═══════════════════════════════════════════════════════
   KEYFRAMES
═══════════════════════════════════════════════════════ */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════ */
@media (max-width: 1100px) {
    .about__grid {
        grid-template-columns: 320px 1fr;
        gap: 56px;
    }

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

@media (max-width: 900px) {
    :root { --section-v: 80px; }

    .nav { padding: 0 24px; }

    .nav__menu {
        position: fixed;
        inset: 0;
        background: var(--bg);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 36px;
        transform: translateX(100%);
        transition: transform 0.4s var(--ease-io);
        z-index: 400;
    }

    .nav__menu.open { transform: translateX(0); }

    .nav__link { font-size: 16px; }

    .nav__burger { display: flex; }

    .about__grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .about__photo-frame { max-height: 340px; }

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

    .service-card { border-right: none !important; border-bottom: 1px solid var(--border) !important; }
    .service-card:last-child { border-bottom: none !important; }

    .contact__grid { grid-template-columns: 1fr; gap: 52px; }

    .footer__inner { flex-direction: column; text-align: center; }

    .footer__links { flex-wrap: wrap; justify-content: center; }
}

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

    .hero__cta { flex-direction: column; align-items: center; }

    .hero__name { font-size: clamp(72px, 20vw, 140px); }

    .about__stats { grid-template-columns: repeat(3, 1fr); }

    /* Showreel — przycisk play i meta przeskalowane pod mniejszą wysokość kontenera,
       żeby nie zasłaniały tytułu */
    .showreel__play {
        width: 58px;
        height: 58px;
    }
    .showreel__play svg {
        width: 20px;
        height: 20px;
        margin-left: 3px;
    }
    .showreel__meta {
        bottom: 14px;
        left: 14px;
        right: 14px;
    }
    .showreel__title { font-size: 10px; }
    .showreel__dur   { font-size: 9px; }
}
