[data-theme="dark"] {
            --bg-primary:#1e2226; --bg-secondary:#23282d; --bg-card:#262c31;
            --bg-elevated:#2c3339; --border:#3a4249; --border-light:#47525a;
            --text-primary:#e8ecef; --text-secondary:#aab4bc; --text-muted:#7d8890;
            --accent:#35a7ff; --accent-soft:rgba(53,167,255,.12);
            --grid-line:rgba(53,167,255,.06); --success:#34c759;
        }

        [data-theme="light"] {
            --bg-primary:#f5f6f7; --bg-secondary:#ffffff; --bg-card:#ffffff;
            --bg-elevated:#eceef0; --border:#d5d9dd; --border-light:#c2c8cd;
            --text-primary:#1f2933; --text-secondary:#4b5560; --text-muted:#7b8794;
            --accent:#f4720b; --accent-soft:rgba(244,114,11,.10);
            --grid-line:rgba(31,41,51,.05); --success:#1e9e50;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        html {
            scroll-behavior: smooth;
            --dur-fast: .18s;
            --dur-reveal: .6s;
            --dur-draw: .65s;
            --ease-draw: cubic-bezier(.22, 1, .36, 1);
        }

        body {
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
            background-color: var(--bg-primary);
            color: var(--text-primary);
            line-height: 1.6;
            overflow-x: hidden;
        }

        /* Animations */
        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(30px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
            }

            to {
                opacity: 1;
            }
        }

        @keyframes pulse {

            0%,
            100% {
                opacity: 1;
                transform: scale(1);
            }

            50% {
                opacity: 0.8;
                transform: scale(1.05);
            }
        }

        

        

        .js .animate-on-scroll,
        .js .reveal-draw {
            opacity: 0;
            transform: translateY(25px);
            transition: opacity var(--dur-reveal) var(--ease-draw) var(--stagger-delay, 0ms),
                transform var(--dur-reveal) var(--ease-draw) var(--stagger-delay, 0ms);
        }

        .js .animate-on-scroll.visible,
        .js .reveal-draw.visible {
            opacity: 1;
            transform: none;
        }

        /* Navigation */
        nav {
            position: fixed;
            top: 0;
            width: 100%;
            background: var(--bg-secondary);
            z-index: 1000;
            padding: 1rem 0;
            border-bottom: 1px solid var(--border);
        }

        .reading-progress {
            position: absolute;
            left: 0;
            bottom: -1px;
            width: 100%;
            height: 2px;
            background: var(--accent);
            transform: scaleX(var(--scroll-progress, 0));
            transform-origin: left;
        }

        .nav-container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 2rem;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .logo {
            font-family: 'JetBrains Mono', monospace;
            font-size: 1.3rem;
            font-weight: 600;
            color: var(--text-primary);
            text-decoration: none;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .logo::before {
            content: '';
            width: 10px;
            height: 10px;
            background: var(--accent);
            border-radius: 4px;
            animation: pulse 2s infinite;
        }

        .nav-links {
            display: flex;
            /* Odstep maleje na weszszych desktopach, zeby dodatkowa pozycja menu
               (np. Media) nie wypchnela nawigacji poza pasek. */
            gap: clamp(1rem, 2.2vw, 2rem);
            list-style: none;
        }

        .nav-links a {
            color: var(--text-secondary);
            text-decoration: none;
            font-size: 0.9rem;
            font-weight: 500;
            transition: color var(--dur-fast) ease;
            position: relative;
        }

        .nav-links a::after {
            content: '';
            position: absolute;
            bottom: -4px;
            left: 0;
            width: 100%;
            height: 2px;
            background: var(--accent);
            transform: scaleX(0);
            transform-origin: left;
            transition: transform var(--dur-fast) var(--ease-draw);
        }

        .nav-links a:hover {
            color: var(--text-primary);
        }

        .nav-links a:hover::after,
        .nav-links a.active::after {
            transform: scaleX(1);
        }

        /* Hero Section */
        .hero {
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 6rem 2rem 4rem;
            background: var(--bg-primary);
            position: relative;
            overflow: hidden;
        }

        .hero::before {
            content: '';
            position: absolute;
            inset: 0;
            background: var(--bg-secondary);
            opacity: 0.35;
            pointer-events: none;
        }

        .hero-grid {
            position: absolute;
            inset: 0;
            background-image:
                linear-gradient(var(--grid-line) 1px, transparent 1px),
                linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
            background-size: 48px 48px;
            opacity: 1;
        }

        .hero-content {
            text-align: center;
            max-width: 800px;
            position: relative;
            z-index: 1;
        }

        .js .hero [data-intro] {
            opacity: 0;
            transform: translateY(18px);
            transition: opacity var(--dur-reveal) var(--ease-draw),
                transform var(--dur-reveal) var(--ease-draw);
        }

        .js .hero.hero-ready [data-intro] {
            opacity: 1;
            transform: none;
        }

        .hero [data-intro]:nth-child(2) { transition-delay: 80ms; }
        .hero [data-intro]:nth-child(3) { transition-delay: 160ms; }
        .hero [data-intro]:nth-child(4) { transition-delay: 240ms; }
        .hero [data-intro]:nth-child(5) { transition-delay: 320ms; }
        .hero [data-intro]:nth-child(6) { transition-delay: 400ms; }

        .hero-badge {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.5rem 1.2rem;
            background: var(--accent-soft);
            border: 1px solid var(--border);
            border-radius: 4px;
            color: var(--accent);
            font-size: 0.8rem;
            font-weight: 500;
            font-family: 'JetBrains Mono', monospace;
            margin-bottom: 1.5rem;
            letter-spacing: 0.5px;
        }

        .hero-badge::before {
            content: '';
            width: 6px;
            height: 6px;
            background: var(--success);
            border-radius: 4px;
            animation: pulse 2s infinite;
        }

        .hero h1 {
            font-size: clamp(2.5rem, 6vw, 4.5rem);
            font-weight: 700;
            margin-bottom: 1rem;
            line-height: 1.1;
            letter-spacing: -0.03em;
        }

        .hero h1 .accent {
            color: var(--accent);
        }

        .hero-subtitle {
            font-family: 'JetBrains Mono', monospace;
            font-size: clamp(0.9rem, 2vw, 1.1rem);
            color: var(--text-secondary);
            margin-bottom: 1.5rem;
        }

        .hero-description {
            font-size: 1.1rem;
            color: var(--text-secondary);
            max-width: 600px;
            margin: 0 auto 2rem;
            line-height: 1.8;
        }

        .hero-stats {
            display: flex;
            justify-content: center;
            gap: 3rem;
            margin-bottom: 2.5rem;
            flex-wrap: wrap;
        }

        .hero-stat {
            text-align: center;
        }

        .hero-stat-number {
            font-family: 'JetBrains Mono', monospace;
            font-size: 2.5rem;
            font-weight: 700;
            color: var(--accent);
            font-variant-numeric: tabular-nums;
        }

        .hero-stat-label {
            font-size: 0.8rem;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        .hero-cta {
            display: flex;
            gap: 1rem;
            justify-content: center;
            flex-wrap: wrap;
        }

        .btn {
            padding: 0.9rem 2rem;
            border-radius: 4px;
            font-size: 0.9rem;
            font-weight: 600;
            text-decoration: none;
            transition: transform var(--dur-fast) var(--ease-draw);
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            font-family: 'JetBrains Mono', monospace;
            cursor: pointer;
            border: none;
        }

        .btn-primary {
            background: var(--accent);
                        color: white;
                    }

        .btn-primary:hover {
            transform: translateY(-2px);
        }

        .btn-secondary {
            background: var(--bg-card);
            color: var(--text-primary);
            border: 1px solid var(--border);
        }

        .btn-secondary:hover {
            border-color: var(--accent);
            background: var(--bg-elevated);
            transform: translateY(-2px);
        }

        .hero-drawing {
            position: absolute;
            left: 50%;
            top: 50%;
            z-index: 0;
            width: min(82vw, 430px);
            opacity: .12;
            transform: translate(-50%, -50%);
            pointer-events: none;
        }

        #heroCad {
            display: block;
            width: 100%;
            overflow: visible;
        }

        #heroCad .cad-axis,
        #heroCad .cad-line,
        #heroCad .cad-dim,
        #heroCad .cad-module-frame,
        #heroCad .cad-center,
        #heroCad .cad-flow-line,
        #heroCad .cad-scan {
            fill: none;
            vector-effect: non-scaling-stroke;
        }

        #heroCad .cad-axis {
            stroke: var(--border);
            stroke-width: .8;
            stroke-dasharray: 4 5;
        }

        #heroCad .cad-line {
            stroke: var(--text-primary);
            stroke-width: 1.1;
        }

        #heroCad .cad-line-soft {
            stroke: var(--text-muted);
            stroke-width: .8;
        }

        #heroCad .cad-module-frame {
            stroke: var(--border-light);
            stroke-width: .8;
        }

        #heroCad .cad-center {
            stroke: var(--text-muted);
            stroke-width: .65;
            stroke-dasharray: 3 4;
            opacity: .65;
        }

        #heroCad .cad-dim {
            stroke: var(--accent);
            stroke-width: .8;
        }

        #heroCad .cad-flow-line {
            stroke: var(--accent);
            stroke-width: 1;
            stroke-dasharray: 5 8;
            animation: cadFlow 2.8s linear infinite;
        }

        #heroCad .cad-arrow,
        #heroCad .cad-node { fill: var(--accent); }

        #heroCad .cad-node { animation: cadNodePulse 1.8s ease-in-out infinite; }

        #heroCad .cad-scan {
            stroke: var(--accent);
            stroke-width: 1.2;
            opacity: .25;
            animation: cadScan 3s var(--ease-draw) infinite;
        }

        #heroCad .cad-process-title {
            fill: var(--text-primary);
            font: 600 8px 'JetBrains Mono', monospace;
            letter-spacing: .8px;
        }

        #heroCad .cad-process-label {
            fill: var(--text-primary);
            font: 600 7px 'JetBrains Mono', monospace;
            letter-spacing: .45px;
        }

        #heroCad .cad-process-meta {
            fill: var(--text-muted);
            font: 6.5px 'JetBrains Mono', monospace;
            letter-spacing: .3px;
        }

        #heroCad .cad-text {
            fill: var(--accent);
            font: 6.5px 'JetBrains Mono', monospace;
            letter-spacing: .25px;
        }

        @keyframes cadFlow {
            to { stroke-dashoffset: -52; }
        }

        @keyframes cadScan {
            0%, 100% { transform: translateY(0); opacity: .2; }
            50% { transform: translateY(46px); opacity: .9; }
        }

        @keyframes cadNodePulse {
            0%, 100% { opacity: .35; }
            50% { opacity: 1; }
        }

        .js #heroCad [data-draw] {
            transition: stroke-dashoffset var(--dur-draw) var(--ease-draw) var(--draw-delay, 0ms);
        }

        .js #heroCad.draw-ready [data-draw] { stroke-dashoffset: 0 !important; }

        /* Kreskowane elementy (ramka arkusza, osie) odsłaniają się kryciem — ich
           stroke-dasharray musi zostać nietknięty, żeby kreska była od pierwszej klatki. */
        .js #heroCad [data-draw-fade] {
            stroke-opacity: 0;
            transition: stroke-opacity var(--dur-draw) var(--ease-draw) var(--draw-delay, 0ms);
        }

        .js #heroCad.draw-ready [data-draw-fade] { stroke-opacity: 1; }

        .hero-coordinates {
            display: none;
            position: absolute;
            right: 1.25rem;
            bottom: 1.25rem;
            z-index: 2;
            color: var(--text-muted);
            font: .7rem 'JetBrains Mono', monospace;
            opacity: 0;
            transition: opacity var(--dur-fast) ease;
        }

        .hero-coordinates.active { opacity: 1; }

        @media (min-width: 1100px) {
            .hero {
                display: grid;
                grid-template-columns: minmax(0, 650px) minmax(320px, 450px);
                gap: clamp(2rem, 6vw, 6rem);
            }

            .hero-content {
                max-width: 650px;
                text-align: left;
            }

            .hero-description { margin-left: 0; }
            .hero-stats {
                display: grid;
                grid-template-columns: repeat(3, minmax(0, 1fr));
                width: 100%;
                gap: 1.5rem;
            }
            .hero-cta { justify-content: flex-start; }
            .hero-stat { text-align: left; }

            .hero-drawing {
                position: relative;
                left: auto;
                top: auto;
                width: min(100%, 430px);
                opacity: 1;
                transform: none;
            }
        }

        @media (hover: hover) and (pointer: fine) and (min-width: 1100px) {
            .hero-coordinates { display: block; }
        }

        /* Sections */
        section {
            padding: 5rem 2rem;
            position: relative;
            scroll-margin-top: 60px;
        }

        .container {
            max-width: 1100px;
            margin: 0 auto;
        }

        .section-header {
            margin-bottom: 3rem;
            text-align: center;
        }

        .section-header h2 {
            font-size: clamp(1.8rem, 4vw, 2.5rem);
            font-weight: 700;
            margin-bottom: 0.5rem;
            position: relative;
            display: inline-block;
        }

        .section-header h2::after,
        .gallery-title h3::after {
            content: '';
            display: block;
            width: 100%;
            min-width: 96px;
            height: 11px;
            margin: .6rem auto 0;
            background:
                linear-gradient(var(--accent), var(--accent)) center / 100% 1px no-repeat,
                linear-gradient(var(--accent), var(--accent)) left center / 1px 11px no-repeat,
                linear-gradient(var(--accent), var(--accent)) right center / 1px 11px no-repeat,
                linear-gradient(45deg, transparent 42%, var(--accent) 43% 56%, transparent 57%) left center / 8px 8px no-repeat,
                linear-gradient(-45deg, transparent 42%, var(--accent) 43% 56%, transparent 57%) right center / 8px 8px no-repeat;
            position: static;
            transform: scaleX(1);
            transform-origin: center;
            transition: transform var(--dur-reveal) var(--ease-draw);
        }

        .js .section-header.animate-on-scroll h2::after,
        .js .gallery-title.animate-on-scroll h3::after { transform: scaleX(0); }

        .js .section-header.animate-on-scroll.visible h2::after,
        .js .gallery-title.animate-on-scroll.visible h3::after { transform: scaleX(1); }

        .section-header p {
            color: var(--text-muted);
            font-size: 1rem;
            margin-top: 1.2rem;
        }

        /* Profile Section */
        .profile {
            background: var(--bg-secondary);
        }

        .profile-content {
            display: grid;
            grid-template-columns: 1fr 1.5fr;
            gap: 3rem;
            align-items: stretch;
        }

        .profile-card {
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 4px;
            padding: 2rem;
            text-align: center;
        }

        .profile-avatar {
            width: 120px;
            height: 120px;
            border-radius: 4px;
            margin: 0 auto 1.5rem;
            object-fit: cover;
            border: 3px solid var(--accent);
        }

        .profile-card h3 {
            font-size: 1.3rem;
            margin-bottom: 0.3rem;
        }

        .profile-card .title {
            color: var(--accent);
            font-size: 0.9rem;
            margin-bottom: 1rem;
        }

        .profile-card .location {
            color: var(--text-muted);
            font-size: 0.85rem;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.3rem;
        }

        .profile-divider {
            height: 1px;
            background: var(--border);
            margin: 1.5rem 0;
        }

        .profile-contact {
            display: flex;
            flex-direction: column;
            gap: 0.8rem;
        }

        .profile-contact a {
            color: var(--text-secondary);
            text-decoration: none;
            font-size: 1.05rem;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 0.55rem;
            transition: color var(--dur-fast) ease;
        }

        .profile-contact a:hover {
            color: var(--accent);
        }

        .profile-text {
            color: var(--text-secondary);
            line-height: 1.9;
        }

        .profile-text p {
            margin-bottom: 1rem;
        }

        /* Skills Section */
        .skills-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
            gap: 1.5rem;
            align-items: stretch;
        }

        .skill-card {
            background: var(--bg-secondary);
            border: 1px solid var(--border);
            border-radius: 4px;
            padding: 1.8rem;
            position: relative;
            transition: transform var(--dur-fast) var(--ease-draw);
            display: flex;
            flex-direction: column;
            height: 100%;
            text-align: left;
        }

        .skill-card:hover {
            border-color: var(--border-light);
            background: var(--bg-card);
            box-shadow: 6px 6px 0 -1px var(--border-light);
        }

        .skill-header {
            display: flex;
            align-items: center;
            gap: 1rem;
            margin-bottom: 1rem;
        }

        .skill-icon {
            width: 44px;
            height: 44px;
            background: var(--accent-soft);
            border-radius: 4px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.2rem;
        }

        .skill-card h3 {
            font-size: 1.1rem;
            font-weight: 600;
        }

        .skill-card p {
            color: var(--text-muted);
            font-size: 0.9rem;
            line-height: 1.7;
            margin-bottom: 1rem;
            flex-grow: 1;
        }

        .skill-level {
            display: flex;
            gap: 0.3rem;
            margin-bottom: 1rem;
        }

        .skill-level-dot {
            width: 8px;
            height: 8px;
            border-radius: 4px;
            background: var(--border-light);
        }

        .skill-level-dot.active {
            background: var(--accent);
        }

        .skill-tags {
            display: flex;
            flex-wrap: wrap;
            gap: 0.4rem;
        }

        .skill-tag {
            padding: 0.3rem 0.7rem;
            background: var(--bg-elevated);
            border: 1px solid var(--border);
            border-radius: 4px;
            font-size: 0.75rem;
            color: var(--text-secondary);
            font-family: 'JetBrains Mono', monospace;
        }

        /* Experience Section */
        .experience {
            background: var(--bg-secondary);
        }

        .timeline {
            position: relative;
            max-width: 800px;
            margin: 0 auto;
            --timeline-progress: 0;
        }

        .timeline::before {
            content: '';
            position: absolute;
            left: 0;
            top: 0;
            bottom: 0;
            width: 2px;
            background: var(--border);
        }

        .timeline::after {
            content: '';
            position: absolute;
            left: 0;
            top: 0;
            bottom: 0;
            width: 2px;
            background: var(--accent);
            transform: scaleY(var(--timeline-progress));
            transform-origin: top;
        }

        .timeline-item {
            position: relative;
            padding-left: 2.5rem;
            padding-bottom: 2.5rem;
        }

        .timeline-item:last-child {
            padding-bottom: 0;
        }

        .timeline-dot {
            position: absolute;
            left: -5px;
            top: 0;
            width: 12px;
            height: 12px;
            z-index: 1;
            background: var(--bg-secondary);
            border-radius: 1px;
            border: 2px solid var(--accent);
            transition: transform var(--dur-fast) var(--ease-draw),
                background-color var(--dur-fast) ease;
        }

        .timeline-dot.passed {
            background: var(--accent);
            transform: scale(1.15);
        }

        .timeline-content {
            background: var(--bg-card);
            padding: 1.5rem;
            border-radius: 4px;
            border: 1px solid var(--border);
        }

        .timeline-date {
            display: inline-block;
            color: var(--accent);
            font-size: 0.8rem;
            font-weight: 500;
            font-family: 'JetBrains Mono', monospace;
            margin-bottom: 0.5rem;
            padding: 0.2rem 0.6rem;
            background: var(--accent-soft);
            border-radius: 4px;
        }

        .timeline-content h3 {
            font-size: 1.15rem;
            margin-bottom: 0.2rem;
        }

        .timeline-content h4 {
            color: var(--text-secondary);
            font-size: 0.9rem;
            font-weight: 400;
            margin-bottom: 0.8rem;
        }

        .timeline-content p {
            color: var(--text-muted);
            font-size: 0.9rem;
            line-height: 1.7;
        }

        .timeline-achievements {
            margin-top: 1rem;
            padding-top: 1rem;
            border-top: 1px solid var(--border);
        }

        .timeline-achievements h5 {
            font-size: 0.75rem;
            color: var(--text-secondary);
            text-transform: uppercase;
            letter-spacing: 1px;
            margin-bottom: 0.5rem;
        }

        .timeline-achievements ul {
            list-style: none;
        }

        .timeline-achievements li {
            color: var(--text-muted);
            font-size: 0.85rem;
            padding-left: 1rem;
            position: relative;
            margin-bottom: 0.3rem;
        }

        .timeline-achievements li::before {
            content: '→';
            position: absolute;
            left: 0;
            color: var(--accent);
        }

        /* Education Section */
        .education-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 1.5rem;
            align-items: stretch;
        }

        .education-card {
            background: var(--bg-secondary);
            border: 1px solid var(--border);
            border-radius: 4px;
            padding: 1.5rem;
            display: flex;
            gap: 1rem;
            transition: transform var(--dur-fast) var(--ease-draw);
            align-items: flex-start;
            height: 100%;
        }

        .education-card:hover {
            border-color: var(--border-light);
            box-shadow: 6px 6px 0 -1px var(--border-light);
        }

        .education-icon {
            width: 48px;
            height: 48px;
            background: var(--accent-soft);
            border-radius: 4px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.3rem;
            flex-shrink: 0;
        }

        .education-content h3 {
            font-size: 1rem;
            margin-bottom: 0.3rem;
        }

        .education-content .school {
            color: var(--text-secondary);
            font-size: 0.85rem;
            margin-bottom: 0.3rem;
        }

        .education-content .year {
            color: var(--text-muted);
            font-size: 0.8rem;
            font-family: 'JetBrains Mono', monospace;
        }

        /* Cover Letter Section */
        .cover-letter {
            background: var(--bg-secondary);
        }

        .letter-container {
            max-width: 800px;
            margin: 0 auto;
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 4px;
            overflow: hidden;
        }

        .letter-header {
            position: relative;
            background: var(--accent-soft);
            padding: 1.5rem 2rem;
            border-bottom: 1px solid var(--border);
        }

        .letter-header h3 {
            font-size: 1.1rem;
            margin-bottom: 0.3rem;
        }

        .letter-header p {
            color: var(--text-muted);
            font-size: 0.85rem;
        }

        .letter-content {
            padding: 2rem;
            color: var(--text-secondary);
            line-height: 1.9;
        }

        .letter-content p {
            margin-bottom: 1.2rem;
        }

        .letter-signature {
            padding: 1.5rem 2rem;
            background: var(--bg-elevated);
            border-top: 1px solid var(--border);
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: 1rem;
        }

        .letter-signature-name {
            font-weight: 600;
            color: var(--text-primary);
        }

        .letter-signature-contact {
            color: var(--text-muted);
            font-size: 0.85rem;
        }

        /* Contact Section */
        .contact-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 1rem;
            align-items: stretch;
        }

        /* 4 karty kontaktu: 2x2 zamiast 3+1 na węższych desktopach */
        @media (min-width: 901px) and (max-width: 1100px) {
            .contact-grid {
                grid-template-columns: repeat(2, 1fr);
            }
        }

        .contact-card {
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 4px;
            padding: 2rem;
            text-align: center;
            transition: transform var(--dur-fast) var(--ease-draw);
            position: relative;
            overflow: hidden;
            display: flex;
            flex-direction: column;
            justify-content: flex-start;
            align-items: center;
            height: 100%;
        }

        .contact-card:hover {
            border-color: var(--accent);
            transform: translateY(-3px);
            box-shadow: 6px 6px 0 -1px var(--border-light);
        }

        .contact-icon {
            width: 50px;
            height: 50px;
            background: var(--accent-soft);
            border-radius: 4px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 1rem;
            font-size: 1.3rem;
        }

        .contact-card h3 {
            font-size: 1rem;
            margin-bottom: 0.3rem;
        }

        .contact-card a {
            color: var(--text-muted);
            text-decoration: none;
            font-size: 0.85rem;
            transition: color var(--dur-fast) ease;
            font-family: 'JetBrains Mono', monospace;
            text-align: center;
        }

        .contact-card a:hover {
            color: var(--accent);
        }

        /* Klauzula RODO — tylko warianty z variant.rodoClause */
        .contact-rodo {
            max-width: 820px;
            margin: 2.5rem auto 0;
            padding: 0.9rem 1.2rem;
            border: 1px dashed var(--border-light);
            border-radius: 4px;
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.72rem;
            line-height: 1.7;
            color: var(--text-muted);
            text-align: center;
        }

        /* Footer */
        footer {
            padding: 2rem;
            background: var(--bg-primary);
            border-top: 1px solid var(--border);
        }

        .footer-content {
            max-width: 1180px;
            margin: 0 auto;
        }

        .footer-title-block {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            border: 1px solid var(--border-light);
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.76rem;
            color: var(--text-secondary);
        }

        .footer-title-block div {
            padding: 0.75rem;
            border-right: 1px solid var(--border);
        }

        .footer-title-block div:last-child {
            border-right: 0;
        }

        .footer-title-block span,
        .cad-status-bar {
            color: var(--text-muted);
        }

        .footer-text {
            color: var(--text-muted);
            font-size: 0.9rem;
            margin-top: 1rem;
            text-align: center;
        }

        .footer-text a {
            color: var(--accent);
            text-decoration: none;
        }

        .cad-status-bar {
            padding: 0.65rem 1rem;
            background: var(--bg-primary);
            border-top: 1px solid var(--border);
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.72rem;
            text-align: center;
            letter-spacing: 0;
        }

        /* Responsive */
        /* Tablet (pion) i węższe — nawigacja zwinięta, profil jednokolumnowy, siatki równe */
        @media (max-width: 900px) {
            body.menu-open { overflow: hidden; }

            .nav-links {
                display: none;
                position: absolute;
                top: 100%;
                left: 0;
                right: 0;
                background: var(--bg-secondary);
                flex-direction: column;
                gap: 0;
                padding: 0.25rem 0;
                border-top: 1px solid var(--border);
                max-height: calc(100vh - 60px);
                overflow-y: auto;
            }

            .nav-links.active {
                display: flex;
            }

            .nav-links li {
                width: 100%;
            }

            .nav-links a {
                display: block;
                width: 100%;
                padding: 0.9rem 2rem;
                font-size: 1rem;
                border-bottom: 1px solid var(--border);
            }

            .nav-links li:last-child a {
                border-bottom: none;
            }

            .nav-links a::after {
                left: 2rem;
                bottom: 0;
                width: calc(100% - 4rem);
            }

            .profile-content {
                grid-template-columns: 1fr;
            }

            .education-grid,
            .proof-grid {
                grid-template-columns: 1fr;
            }
        }

        /* Tablet only (701–900) — równe siatki wielokolumnowe zamiast rozjeżdżającego auto-fit */
        @media (max-width: 1099px) {
            #heroCad .cad-process-title,
            #heroCad .cad-process-label,
            #heroCad .cad-process-meta { display: none; }
        }

        @media (min-width: 701px) and (max-width: 900px) {
            .skills-grid {
                grid-template-columns: repeat(2, 1fr);
            }

            .contact-grid {
                grid-template-columns: repeat(2, 1fr);
            }
        }

        @media (max-width: 700px) {
            .hero {
                padding: 5rem 1.5rem 3rem;
            }

            .hero-stats {
                gap: 2rem;
            }

            .hero-cta {
                flex-direction: column;
            }

            .btn {
                width: 100%;
                justify-content: center;
            }

            section {
                padding: 3rem 1.5rem;
            }

            .profile-content {
                grid-template-columns: 1fr;
            }

            .timeline::before,
            .timeline::after {
                left: 8px;
            }

            .timeline-item {
                padding-left: 2rem;
            }

            .timeline-dot {
                left: 3px;
            }

            .letter-content {
                padding: 1.5rem;
            }

            .letter-signature {
                flex-direction: column;
                text-align: center;
            }

            .contact-grid {
                grid-template-columns: 1fr;
            }
        }

        /* Panorama 360 Section */
        .panorama-section {
            background: var(--bg-secondary);
            padding: 5rem 2rem;
        }

        .panorama-container {
            max-width: 1000px;
            margin: 0 auto;
        }

        .panorama-container + .panorama-container {
            margin-top: 3rem;
        }

        .panorama-wrapper {
            position: relative;
            width: 100%;
            height: 450px;
            border-radius: 4px;
            overflow: hidden;
            border: 1px solid var(--border);
        }

        .js .panorama-container .panorama-wrapper {
            opacity: 0;
            transform: scaleX(.06);
            transform-origin: center;
            transition: opacity var(--dur-reveal) var(--ease-draw),
                transform var(--dur-reveal) var(--ease-draw);
        }

        .js .panorama-container.visible .panorama-wrapper {
            opacity: 1;
            transform: none;
        }

        .viewer-stamp,
        .figure-stamp {
            font-family: 'JetBrains Mono', monospace;
            letter-spacing: .08em;
            text-transform: uppercase;
        }

        .viewer-stamp {
            width: fit-content;
            margin: 0 auto .65rem;
            padding: .3rem .55rem;
            color: var(--accent);
            border: 1px solid var(--border);
            background: var(--bg-card);
            font-size: .68rem;
        }

        @media (max-width: 700px) {
            .panorama-wrapper {
                height: 300px;
            }
        }

        .panorama-viewer {
            width: 100%;
            height: 100%;
        }

        .panorama-instructions {
            position: absolute;
            bottom: 20px;
            left: 50%;
            transform: translateX(-50%);
            background: rgba(0, 0, 0, 0.7);
            backdrop-filter: blur(10px);
            padding: 0.75rem 1.5rem;
            border-radius: 4px;
            font-size: 0.85rem;
            color: var(--text-secondary);
            display: flex;
            align-items: center;
            gap: 0.5rem;
            pointer-events: none;
            z-index: 10;
            transition: opacity var(--dur-fast) ease;
        }

        .panorama-instructions.hidden {
            opacity: 0;
        }

        .panorama-status {
            position: absolute;
            left: 50%;
            top: 50%;
            z-index: 14;
            max-width: min(90%, 520px);
            transform: translate(-50%, -50%);
            padding: 0.85rem 1rem;
            border: 1px solid rgba(255, 255, 255, 0.25);
            border-radius: 4px;
            background: rgba(0, 0, 0, 0.72);
            color: #fff;
            font-size: 0.9rem;
            text-align: center;
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
        }

        .panorama-status.error {
            border-color: rgba(239, 68, 68, 0.7);
        }

        /* Przełącznik żyroskopu (własny — wbudowany Pannellum nie działa na iOS) */
        .panorama-gyro {
            position: absolute;
            top: 12px;
            right: 12px;
            z-index: 12;
            display: inline-flex;
            align-items: center;
            gap: 0.4rem;
            padding: 0.5rem 0.7rem;
            background: rgba(0, 0, 0, 0.6);
            color: #fff;
            border: 1px solid rgba(255, 255, 255, 0.28);
            border-radius: 4px;
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.72rem;
            cursor: pointer;
            backdrop-filter: blur(6px);
            -webkit-backdrop-filter: blur(6px);
        }

        .panorama-gyro-icon {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 1rem;
            height: 1rem;
            flex-shrink: 0;
        }

        .panorama-gyro.active {
            background: var(--accent);
            border-color: var(--accent);
        }

        /* Wbudowany przycisk orientacji Pannellum chowamy — używamy własnego, spójnego iOS/Android */
        .pnlm-orientation-button {
            display: none !important;
        }

        .pnlm-hotspot-base {
            cursor: pointer;
        }

        .panorama-caption {
            text-align: center;
            margin-top: 1.5rem;
            color: var(--text-muted);
            font-size: 0.9rem;
        }

        .panorama-description {
            margin: 0 0 1rem;
            padding: 1.5rem;
            background: var(--bg-card);
            border-radius: 4px;
            border: 1px solid var(--border);
            text-align: center;
        }

        .panorama-description h3 {
            color: var(--text-primary);
            font-size: 1.1rem;
            font-weight: 600;
            margin-bottom: 0.75rem;
        }

        .panorama-description p {
            color: var(--text-secondary);
            font-size: 0.95rem;
            line-height: 1.7;
            margin: 0;
            max-width: 800px;
            margin-left: auto;
            margin-right: auto;
        }

        @media (max-width: 768px) {
            .panorama-description {
                padding: 1rem;
            }

            .panorama-description h3 {
                font-size: 1rem;
            }

            .panorama-description p {
                font-size: 0.9rem;
            }
        }

        /* Gallery Section */
        .gallery-section {
            background: var(--bg-primary);
            padding: 4rem 2rem;
        }

        .gallery-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 1rem;
            max-width: 1000px;
            margin: 0 auto;
        }

        @media (max-width: 768px) {
            .gallery-grid {
                grid-template-columns: repeat(2, 1fr);
                gap: 0.5rem;
            }
        }

        @media (max-width: 480px) {
            .gallery-grid {
                grid-template-columns: 1fr;
            }
        }

        .gallery-item {
            position: relative;
            aspect-ratio: 4/3;
            border-radius: 4px;
            overflow: hidden;
            cursor: pointer;
            border: 1px solid var(--border);
            transition: transform var(--dur-fast) var(--ease-draw);
        }

        .gallery-item:hover,
        .gallery-item:focus-visible {
            border-color: var(--accent);
            transform: scale(1.02);
            outline: none;
        }

        .figure-stamp {
            position: absolute;
            top: .55rem;
            right: .55rem;
            z-index: 2;
            padding: .2rem .35rem;
            color: #fff;
            border: 1px solid rgba(255, 255, 255, .45);
            background: rgba(0, 0, 0, .64);
            font-size: .62rem;
        }

        .gallery-item img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform var(--dur-fast) var(--ease-draw);
        }

        .gallery-item:hover img {
            transform: scale(1.1);
        }

        .gallery-overlay {
            position: absolute;
            inset: 0;
            background: rgba(0, 0, 0, 0.62);
            opacity: 0;
            transition: opacity var(--dur-fast) ease;
            display: flex;
            align-items: flex-end;
            padding: 1rem;
        }

        .gallery-item:hover .gallery-overlay {
            opacity: 1;
        }

        .gallery-overlay span {
            color: white;
            font-size: 0.85rem;
            font-weight: 500;
        }

        /* Media i realizacje — sekcja opcjonalna, tylko w wariantach z variant.media */
        .media-section {
            background: var(--bg-secondary);
        }

        /* Media i Doświadczenie mają to samo tło — kreska je rozdziela. */
        .media-section + .experience {
            border-top: 1px solid var(--border);
        }

        .media-videos {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 1.5rem;
            max-width: 900px;
            margin: 0 auto;
        }

        .media-video {
            display: block;
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 4px;
            overflow: hidden;
            text-decoration: none;
            color: inherit;
            transition: transform var(--dur-fast) var(--ease-draw);
        }

        .media-video:hover,
        .media-video:focus-visible {
            border-color: var(--accent);
            transform: translateY(-3px);
            box-shadow: 6px 6px 0 -1px var(--border-light);
            outline: none;
        }

        .media-video-thumb {
            position: relative;
            display: block;
            aspect-ratio: 16/9;
            overflow: hidden;
            background: var(--bg-elevated);
        }

        .media-video-thumb img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform var(--dur-fast) var(--ease-draw);
        }

        .media-video:hover .media-video-thumb img {
            transform: scale(1.05);
        }

        .media-video-play {
            position: absolute;
            inset: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #fff;
            background: rgba(0, 0, 0, .3);
            transition: background var(--dur-fast) ease;
        }

        .media-video-play svg {
            width: 52px;
            height: 52px;
            filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .55));
        }

        .media-video:hover .media-video-play {
            background: rgba(0, 0, 0, .12);
        }

        .media-video-body {
            display: block;
            padding: 1rem 1.1rem 1.2rem;
        }

        .media-video-title {
            display: block;
            font-size: 0.95rem;
            font-weight: 600;
            margin-bottom: 0.3rem;
        }

        .media-video-meta {
            display: block;
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.72rem;
            color: var(--text-muted);
        }

        .media-footer {
            max-width: 900px;
            margin: 2.2rem auto 0;
            text-align: center;
        }

        .media-proof {
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.82rem;
            color: var(--accent);
            margin-bottom: 1.2rem;
        }

        .media-bonus {
            max-width: 700px;
            margin: 1.6rem auto 0;
            color: var(--text-secondary);
            font-size: 0.9rem;
        }

        @media (max-width: 700px) {
            .media-videos {
                grid-template-columns: 1fr;
            }
        }

        /* Lightbox */
        .lightbox {
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.95);
            z-index: 9999;
            display: none;
            align-items: center;
            justify-content: center;
            backdrop-filter: blur(10px);
        }

        .lightbox.active {
            display: flex;
        }

        .lightbox-content {
            position: relative;
            max-width: 90vw;
            max-height: 90vh;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .lightbox-image {
            max-width: 100%;
            max-height: 85vh;
            object-fit: contain;
            border-radius: 4px;
            box-shadow: 0 12px 30px rgba(0, 0, 0, 0.16);
        }

        .lightbox-close {
            position: absolute;
            top: 20px;
            right: 20px;
            width: 50px;
            height: 50px;
            background: rgba(255, 255, 255, 0.1);
            border: none;
            border-radius: 4px;
            color: white;
            font-size: 1.5rem;
            cursor: pointer;
            transition: background-color var(--dur-fast) ease;
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 10001;
        }

        .lightbox-close:hover {
            background: rgba(255, 255, 255, 0.2);
        }

        .lightbox-nav {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            width: 50px;
            height: 50px;
            background: rgba(255, 255, 255, 0.1);
            border: none;
            border-radius: 4px;
            color: white;
            font-size: 1.5rem;
            cursor: pointer;
            transition: background-color var(--dur-fast) ease;
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 10001;
        }

        .lightbox-nav:hover {
            background: rgba(255, 255, 255, 0.2);
        }

        .lightbox-prev {
            left: 20px;
        }

        .lightbox-next {
            right: 20px;
        }

        .lightbox-swipe-hint {
            display: none;
        }

        @media (max-width: 768px) {
            .lightbox-nav {
                display: none;
            }

            .lightbox-swipe-hint {
                display: block;
                position: absolute;
                bottom: 80px;
                left: 50%;
                transform: translateX(-50%);
                color: rgba(255, 255, 255, 0.6);
                font-size: 0.85rem;
                padding: 0.5rem 1rem;
                background: rgba(0, 0, 0, 0.5);
                border-radius: 4px;
            }
        }

        .lightbox-counter {
            position: absolute;
            bottom: 20px;
            left: 50%;
            transform: translateX(-50%);
            color: rgba(255, 255, 255, 0.7);
            font-size: 0.9rem;
            font-weight: 500;
        }

        .gallery-title {
            text-align: center;
            margin-bottom: 2rem;
        }

        .gallery-title h3 {
            font-size: clamp(1.8rem, 4vw, 2.5rem);
            font-weight: 700;
            color: var(--text-primary);
            margin-bottom: 0.5rem;
            position: relative;
            display: inline-block;
        }

        .gallery-title p {
            color: var(--text-muted);
            font-size: 1rem;
            margin-top: 1.2rem;
        }

        /* PDF Download Buttons */
        .pdf-buttons {
            position: fixed;
            bottom: 2rem;
            right: 2rem;
            display: flex;
            flex-direction: column;
            gap: 0.75rem;
            z-index: 100;
        }

        .pdf-btn {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.75rem 1.25rem;
            background: var(--accent);
            color: white;
            border: none;
            border-radius: 4px;
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.85rem;
            font-weight: 600;
            cursor: pointer;
            transition: transform var(--dur-fast) var(--ease-draw);
            text-decoration: none;
        }

        .pdf-btn:hover {
            transform: translateY(-2px);
        }

        .pdf-btn.secondary {
            background: var(--bg-card);
            border: 1px solid var(--border);
            color: var(--text-primary);
        }

        .pdf-btn.secondary:hover {
            border-color: var(--accent);
        }

        .pdf-btn svg {
            width: 18px;
            height: 18px;
        }


        .letter-badge {
            display: inline-block;
            padding: 0.2rem 0.5rem;
            background: var(--accent);
            color: white;
            border-radius: 4px;
            font-size: 0.65rem;
            font-weight: 600;
            text-transform: uppercase;
            margin-left: 0.5rem;
        }

        /* Loading State */
        .letter-loading {
            text-align: center;
            padding: 2rem;
            color: var(--text-muted);
        }

        .letter-loading::after {
            content: '';
            display: inline-block;
            width: 20px;
            height: 20px;
            border: 2px solid var(--border);
            border-top-color: var(--accent);
            border-radius: 4px;
            margin-left: 10px;
            animation: spin 1s linear infinite;
        }

        @keyframes spin {
            to {
                transform: rotate(360deg);
            }
        }

        /* Węższe desktopy/tablety poziomo: same ikony, żeby nie zasłaniać tekstu listu */
        @media (min-width: 769px) and (max-width: 1100px) {
            .pdf-btn {
                padding: 0.75rem;
            }

            .pdf-btn .pdf-btn-label {
                display: none;
            }
        }

        @media (max-width: 768px) {
            .pdf-buttons {
                position: static;
                flex-direction: row;
                justify-content: center;
                padding: 1rem;
                background: var(--bg-primary);
                border-top: 1px solid var(--border);
            }

            .pdf-btn {
                flex: 1;
                justify-content: center;
                font-size: 0.75rem;
                padding: 0.6rem 1rem;
            }

            body {
                padding-bottom: 0;
            }
        }

        .skill-card.has-proofs {
            cursor: pointer;
        }

        .skill-card.has-proofs::before {
            content: '';
            position: absolute;
            inset: -9px;
            pointer-events: none;
            opacity: 0;
            background:
                linear-gradient(var(--accent), var(--accent)) left 1px top 8px / 16px 1px no-repeat,
                linear-gradient(var(--accent), var(--accent)) left 8px top 1px / 1px 16px no-repeat,
                linear-gradient(var(--accent), var(--accent)) right 1px top 8px / 16px 1px no-repeat,
                linear-gradient(var(--accent), var(--accent)) right 8px top 1px / 1px 16px no-repeat,
                linear-gradient(var(--accent), var(--accent)) left 1px bottom 8px / 16px 1px no-repeat,
                linear-gradient(var(--accent), var(--accent)) left 8px bottom 1px / 1px 16px no-repeat,
                linear-gradient(var(--accent), var(--accent)) right 1px bottom 8px / 16px 1px no-repeat,
                linear-gradient(var(--accent), var(--accent)) right 8px bottom 1px / 1px 16px no-repeat;
            transition: opacity var(--dur-fast) ease;
        }

        .skill-card.has-proofs:hover::before,
        .skill-card.has-proofs:focus-visible::before { opacity: 1; }

        .skill-card.has-proofs::after {
            content: 'Zobacz dowody';
            display: inline-flex;
            align-self: flex-start;
            margin-top: 1rem;
            padding: 0.35rem 0.65rem;
            color: var(--accent);
            border: 1px solid var(--border);
            border-radius: 4px;
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.72rem;
        }

        .skill-card.has-proofs:focus-visible {
            outline: 2px solid var(--accent);
            outline-offset: 4px;
        }

        .skill-modal {
            position: fixed;
            inset: 0;
            z-index: 2000;
            display: none;
            align-items: center;
            justify-content: center;
            padding: 1rem;
            background: rgba(10, 8, 7, 0.68);
            backdrop-filter: blur(12px);
        }

        .skill-modal.active {
            display: flex;
        }

        .skill-modal-dialog {
            width: min(900px, 100%);
            max-height: min(820px, 92vh);
            overflow: auto;
            padding: clamp(1.4rem, 4vw, 2.4rem);
            background: var(--bg-card);
            border: 1px solid var(--border-light);
            border-radius: 4px;
            box-shadow: 0 12px 30px rgba(0, 0, 0, 0.16);
        }

        .skill-modal-close {
            float: right;
            padding: 0.45rem 0.7rem;
            color: var(--text-primary);
            background: var(--bg-elevated);
            border: 1px solid var(--border);
            border-radius: 4px;
            cursor: pointer;
        }

        .skill-modal h3 {
            margin: 0 0 0.75rem;
            font-size: clamp(1.5rem, 4vw, 2.3rem);
        }

        .skill-modal p,
        .skill-modal li {
            color: var(--text-secondary);
        }

        .skill-modal-grid {
            display: grid;
            grid-template-columns: 1.2fr 0.8fr;
            gap: 1.2rem;
            margin-top: 1.2rem;
        }

        .skill-modal-panel {
            padding: 1rem;
            background: var(--bg-secondary);
            border: 1px solid var(--border);
            border-radius: 4px;
        }

        .skill-modal-panel h4 {
            margin-bottom: 0.7rem;
            color: var(--accent);
        }

        .folder-path {
            display: inline-block;
            max-width: 100%;
            overflow-wrap: anywhere;
            padding: 0.4rem 0.55rem;
            color: var(--accent);
            background: var(--bg-primary);
            border: 1px solid var(--border);
            border-radius: 4px;
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.8rem;
        }

        .media-proof-section {
            background: var(--bg-secondary);
        }

        .proof-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
            gap: 1rem;
            margin-top: 2rem;
        }

        .proof-card {
            padding: 1.4rem;
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 4px;
        }

        .proof-card h3 {
            margin-bottom: 0.75rem;
        }

        .proof-card p {
            color: var(--text-muted);
        }

        .model-section {
            background: var(--bg-primary);
        }

        .studio3d {
            position: relative;
            margin-top: 1rem;
            overflow: hidden;
            background: #141310;
            border: 1px solid var(--border);
            border-radius: 4px;
        }

        .studio3d__stage {
            position: relative;
            width: 100%;
            max-height: 72vh;
            aspect-ratio: 16 / 9;
            overflow: hidden;
            background: #141310;
            cursor: grab;
            touch-action: none;
        }

        .studio3d__stage:active { cursor: grabbing; }
        .studio3d__stage canvas { display: block; width: 100%; height: 100%; }
        .studio3d:fullscreen,
        .studio3d.studio3d--fullscreen { border: 0; border-radius: 0; }
        .studio3d.studio3d--fullscreen {
            position: fixed;
            inset: 0;
            z-index: 10002;
            width: 100vw;
            height: 100dvh;
            margin: 0;
        }
        .studio3d:fullscreen .studio3d__stage,
        .studio3d--fullscreen .studio3d__stage { height: 100%; max-height: none; aspect-ratio: auto; }
        .studio3d:fullscreen .studio3d__controls,
        .studio3d--fullscreen .studio3d__controls { bottom: max(.75rem, env(safe-area-inset-bottom)); }

        .studio3d__fullscreen {
            position: absolute;
            top: max(.75rem, env(safe-area-inset-top));
            right: max(.75rem, env(safe-area-inset-right));
            z-index: 8;
            min-height: 34px;
            padding: .5rem .7rem;
            color: #fff;
            background: rgba(0, 0, 0, .7);
            border: 1px solid rgba(255, 255, 255, .35);
            border-radius: 4px;
            font: 600 .68rem 'JetBrains Mono', monospace;
            letter-spacing: .05em;
            text-transform: uppercase;
            cursor: pointer;
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
        }

        .studio3d__fullscreen:hover,
        .studio3d__fullscreen.on {
            background: var(--accent);
            border-color: var(--accent);
        }

        .studio3d__controls {
            position: absolute;
            right: .75rem;
            bottom: .75rem;
            left: .75rem;
            z-index: 5;
            display: flex;
            flex-wrap: wrap;
            gap: .45rem 1rem;
            max-height: 42%;
            padding: .75rem 5rem .75rem .75rem;
            overflow-y: auto;
            background: rgba(0, 0, 0, .74);
            border: 1px solid rgba(255, 255, 255, .28);
            border-radius: 4px;
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
        }

        .s3d-group {
            display: flex;
            flex: 0 0 auto;
            flex-wrap: wrap;
            align-items: center;
            gap: .3rem;
        }

        .s3d-group--end { margin-left: auto; }

        .s3d-label {
            margin-right: .2rem;
            color: rgba(255, 255, 255, .62);
            font: 500 .58rem 'JetBrains Mono', monospace;
            letter-spacing: .12em;
            text-transform: uppercase;
        }

        .studio3d__controls button {
            display: inline-flex;
            align-items: center;
            gap: .35rem;
            padding: .42rem .72rem;
            min-height: 32px;
            color: #fff;
            background: rgba(0, 0, 0, .58);
            border: 1px solid rgba(255, 255, 255, .32);
            border-radius: 4px;
            font: 500 .62rem 'JetBrains Mono', monospace;
            letter-spacing: .06em;
            text-transform: uppercase;
            cursor: pointer;
            backdrop-filter: blur(6px);
            -webkit-backdrop-filter: blur(6px);
        }

        .studio3d__controls button:hover { color: var(--accent); border-color: var(--accent); }
        .studio3d__controls button.on { color: #fff; background: var(--accent); border-color: var(--accent); }
        .studio3d__controls button.disabled { opacity: .35; pointer-events: none; }

        .s3d-slider {
            display: inline-flex;
            align-items: center;
            gap: .35rem;
            padding: .3rem .55rem;
            min-height: 32px;
            background: rgba(0, 0, 0, .58);
            border: 1px solid rgba(255, 255, 255, .32);
            border-radius: 4px;
        }

        .s3d-slider span { color: rgba(255, 255, 255, .68); font-size: .7rem; }
        .s3d-slider input { width: 78px; accent-color: var(--accent); cursor: ew-resize; }
        .s3d-slider:has(input.active) { border-color: var(--accent); }

        .studio3d__hint {
            position: absolute;
            top: .8rem;
            left: 50%;
            z-index: 5;
            max-width: 92%;
            padding: .42rem .85rem;
            overflow: hidden;
            color: #f2ecdf;
            background: rgba(22, 20, 15, .78);
            border: 1px solid rgba(255, 255, 255, .2);
            font: 500 .6rem 'JetBrains Mono', monospace;
            letter-spacing: .09em;
            text-overflow: ellipsis;
            text-transform: uppercase;
            white-space: nowrap;
            transform: translateX(-50%);
            transition: opacity .35s ease;
            pointer-events: none;
        }

        .studio3d__hint.hidden { opacity: 0; }

        .studio3d__loading,
        .studio3d__fallback {
            position: absolute;
            inset: 0;
            z-index: 4;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 2rem;
            color: #b8b2a6;
            font: 500 .7rem 'JetBrains Mono', monospace;
            letter-spacing: .12em;
            text-align: center;
            text-transform: uppercase;
        }

        .studio3d__loading { transition: opacity .35s ease; pointer-events: none; }
        .studio3d__loading.hidden { opacity: 0; }
        .studio3d__fallback { z-index: 6; display: none; background: #141310; }
        .studio3d.no-webgl .studio3d__fallback { display: flex; }

        .s3d-walk-pad {
            position: absolute;
            right: 1rem;
            bottom: 1rem;
            z-index: 5;
            display: none;
            grid-template-columns: repeat(3, 42px);
            grid-template-rows: repeat(2, 42px);
            gap: 4px;
        }

        .studio3d.walk-mode .s3d-walk-pad { display: grid; }
        .s3d-walk-pad [data-s3d-move="forward"] { grid-column: 2; }
        .s3d-walk-pad [data-s3d-move="left"] { grid-column: 1; grid-row: 2; }
        .s3d-walk-pad [data-s3d-move="back"] { grid-column: 2; grid-row: 2; }
        .s3d-walk-pad [data-s3d-move="right"] { grid-column: 3; grid-row: 2; }

        .s3d-walk-pad button {
            color: #fff;
            background: rgba(18, 17, 14, .8);
            border: 1px solid rgba(255, 255, 255, .55);
            font: 700 1rem 'JetBrains Mono', monospace;
            backdrop-filter: blur(4px);
            touch-action: none;
        }

        .model-caption {
            margin: 1rem auto 0;
            max-width: 860px;
            color: var(--text-secondary);
            font-size: .92rem;
            line-height: 1.75;
            text-align: center;
        }

        @media (max-width: 900px), (pointer: coarse) {
            .studio3d__stage { aspect-ratio: 16 / 10; }
            .s3d-mobile-hidden { display: none !important; }
            .studio3d__controls {
                right: .5rem;
                bottom: .5rem;
                left: .5rem;
                flex-wrap: nowrap;
                gap: .75rem;
                max-height: none;
                padding: .5rem;
                overflow-x: auto;
                overflow-y: hidden;
                overscroll-behavior-x: contain;
                scrollbar-width: none;
                -webkit-overflow-scrolling: touch;
            }
            .studio3d__controls::-webkit-scrollbar { display: none; }
            .s3d-group { flex-wrap: nowrap; }
            .s3d-group--end { margin-left: 0; }
            .studio3d:fullscreen .studio3d__controls,
            .studio3d--fullscreen .studio3d__controls { bottom: max(.5rem, env(safe-area-inset-bottom)); }
        }

        @media (max-width: 700px) {
            .studio3d__stage { aspect-ratio: 4 / 3; }
            .studio3d__hint { display: none; }
            .s3d-slider input { width: 68px; }
            .model-caption { font-size: .86rem; line-height: 1.65; }
        }

        .accent,
        .hero-stat-number,
        .timeline-date,
        .letter-header h3 {
            color: var(--accent);
            background: none;
        }

        .btn,
        .skill-tag,
        .pdf-btn,
        .theme-toggle,
        .mobile-menu-btn,
        .model-controls button {
            border-radius: 3px;
        }

        .svg-icon {
            display: inline-block;
            width: 1.15em;
            height: 1.15em;
            vertical-align: -0.18em;
            stroke: currentColor;
        }

        .skill-icon,
        .education-icon,
        .contact-icon {
            color: var(--accent);
        }

        .nav-actions {
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .theme-toggle,
        .mobile-menu-btn,
        .lang-switch {
            width: 40px;
            height: 40px;
            padding: 0;
            display: grid;
            place-items: center;
            color: var(--text-primary);
            background: var(--bg-elevated);
            border: 1px solid var(--border);
            cursor: pointer;
        }

        .theme-toggle:hover,
        .mobile-menu-btn:hover,
        .lang-switch:hover,
        .lang-switch:focus-visible {
            border-color: var(--accent);
            color: var(--accent);
        }

        .mobile-menu-btn {
            display: none;
        }

        /* Przełącznik języka — wygląda jak przycisk motywu, ale jest linkiem do bliźniaczej wersji */
        .lang-switch {
            border-radius: 3px;
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.78rem;
            font-weight: 600;
            letter-spacing: 0.04em;
            text-decoration: none;
            transition: color var(--dur-fast) ease, border-color var(--dur-fast) ease;
        }

        .sec-num {
            margin-right: 0.5rem;
            color: var(--text-muted);
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.62em;
            font-weight: 500;
            vertical-align: middle;
        }

        /* Standalone panoramas page */
        .panoramas-page {
            min-height: 100vh;
            background: var(--bg-primary);
            color: var(--text-primary);
        }

        .panoramas-header,
        .panoramas-footer {
            width: min(1180px, calc(100% - 2rem));
            margin: 0 auto;
            padding: 1rem 0;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 1rem;
        }

        .panoramas-main {
            width: min(1180px, calc(100% - 2rem));
            margin: 0 auto;
            padding: 2rem 0 4rem;
        }

        .panoramas-intro {
            padding: 1.5rem 0 2rem;
            border-bottom: 1px solid var(--border);
            margin-bottom: 2rem;
        }

        .panoramas-intro h1 {
            font-size: clamp(2rem, 6vw, 4rem);
            margin: 0.25rem 0 0.75rem;
            letter-spacing: 0;
        }

        .panoramas-intro p:last-child,
        .panoramas-project-lead {
            color: var(--text-secondary);
            line-height: 1.7;
        }

        .panoramas-project {
            padding: 2rem 0 3rem;
            border-bottom: 1px solid var(--border);
        }

        .panoramas-project-header {
            display: flex;
            align-items: flex-end;
            justify-content: space-between;
            gap: 1rem;
            margin-bottom: 1rem;
        }

        .panoramas-project-header h2 {
            margin: 0.25rem 0 0;
            font-size: clamp(1.5rem, 4vw, 2.5rem);
            letter-spacing: 0;
        }

        .panorama-project-link {
            color: var(--accent);
            font-size: 0.9rem;
            text-decoration: none;
        }

        .panoramas-layout {
            display: grid;
            grid-template-columns: minmax(0, 1fr) 320px;
            gap: 1.5rem;
            margin-top: 1.5rem;
            align-items: start;
        }

        .panoramas-main-viewer {
            height: min(62vh, 620px);
            min-height: 420px;
        }

        .panoramas-side {
            display: grid;
            gap: 1rem;
        }

        .panorama-scene-list {
            display: grid;
            gap: 0.5rem;
        }

        /* Sekcja 03: przyciski scen zostaja na panoramie takze w fullscreenie */
        .panorama-scene-list-overlay {
            position: absolute;
            left: 50%;
            bottom: 10px;
            z-index: 20;
            width: max-content;
            max-width: calc(100% - 1rem);
            transform: translateX(-50%);
            display: flex;
            flex-wrap: nowrap;
            gap: 0.35rem;
            overflow-x: auto;
            overscroll-behavior-x: contain;
            scrollbar-width: none;
            -webkit-overflow-scrolling: touch;
        }

        .panorama-scene-list-overlay::-webkit-scrollbar {
            display: none;
        }

        .panorama-scene-list-overlay .panorama-scene-button {
            flex: 0 0 auto;
            width: auto;
            min-width: 0;
            padding: 0.55rem 0.8rem;
            text-align: center;
            white-space: nowrap;
            font-size: 0.82rem;
            line-height: 1;
            font-weight: 600;
            border-color: rgba(255, 255, 255, 0.35);
            background: rgba(0, 0, 0, 0.7);
            color: #fff;
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
        }

        .panorama-scene-list-overlay .panorama-scene-button.active {
            border-color: var(--accent);
            background: var(--accent);
            color: #fff;
        }

        .panorama-wrapper-has-scenes .panorama-instructions {
            bottom: 58px;
        }

        .panorama-scene-button {
            width: 100%;
            padding: 0.75rem 0.9rem;
            border: 1px solid var(--border);
            border-radius: 4px;
            background: var(--bg-card);
            color: var(--text-primary);
            text-align: left;
            cursor: pointer;
            font: inherit;
        }

        .panorama-scene-button.active {
            border-color: var(--accent);
            color: var(--accent);
        }

        .panorama-scene-description,
        .panoramas-meta {
            padding: 1rem;
            border: 1px solid var(--border);
            border-radius: 4px;
            background: var(--bg-card);
        }

        .panorama-scene-description h3,
        .panoramas-meta h3 {
            margin: 0 0 0.5rem;
            font-size: 1rem;
        }

        .panorama-scene-description p {
            margin: 0;
            color: var(--text-secondary);
            line-height: 1.7;
        }

        .panoramas-tags {
            display: flex;
            flex-wrap: wrap;
            gap: 0.5rem;
            margin: 0 0 1rem;
            padding: 0;
            list-style: none;
        }

        .panoramas-tags li {
            padding: 0.35rem 0.55rem;
            border-radius: 4px;
            background: var(--bg-secondary);
            color: var(--text-secondary);
            font-size: 0.85rem;
        }

        @media (max-width: 900px) {
            .panoramas-layout {
                grid-template-columns: 1fr;
            }

            .panoramas-main-viewer {
                min-height: 320px;
                height: 420px;
            }
        }

        @media (max-width: 900px) {
            .panorama-scene-list-overlay {
                max-width: calc(100% - 0.5rem);
                gap: 0.25rem;
                bottom: 4px;
            }

            .panorama-scene-list-overlay .panorama-scene-button {
                padding: 0.45rem 0.6rem;
                font-size: 0.72rem;
            }

            .panorama-wrapper-has-scenes .panorama-instructions {
                display: none;
            }
        }

        @media (prefers-reduced-motion: reduce) {
            *,
            *::before,
            *::after {
                animation: none !important;
                transition: none !important;
                scroll-behavior: auto !important;
            }

            .animate-on-scroll,
            .reveal-draw,
            .hero [data-intro] {
                opacity: 1 !important;
                transform: none !important;
            }

            .hero-coordinates { display: none !important; }
        }

        @media print {
            html {
                --bg-primary:#f5f6f7; --bg-secondary:#ffffff; --bg-card:#ffffff;
                --bg-elevated:#eceef0; --border:#d5d9dd; --border-light:#c2c8cd;
                --text-primary:#1f2933; --text-secondary:#4b5560; --text-muted:#7b8794;
                --accent:#f4720b; --accent-soft:rgba(244,114,11,.10);
                --grid-line:rgba(31,41,51,.05); --success:#1e9e50;
            }

            nav,
            .theme-toggle,
            .lang-switch,
            .cad-status-bar,
            .pdf-buttons,
            .lightbox,
            .mobile-menu-btn,
            .reading-progress,
            .hero-drawing,
            .hero-coordinates,
            .model-section,
            .viewer-stamp,
            .figure-stamp,
            .media-video-play {
                display: none !important;
            }

            body {
                padding: 0;
                background: white;
                color: black;
            }

            section {
                padding: 2rem 1rem;
                page-break-inside: avoid;
            }

            .letter-container { border: 1px solid #ccc; }
        }

        /* Hamburger pojawia się tam, gdzie chowa się nav (≤900px) — musi być PO
           regule .mobile-menu-btn{display:none}, żeby wygrać w kaskadzie. */
        @media (max-width: 900px) {
            .mobile-menu-btn {
                display: grid;
            }
        }

        @media (max-width: 768px) {
            .footer-title-block {
                grid-template-columns: 1fr;
            }

            .footer-title-block div {
                border-right: 0;
                border-bottom: 1px solid var(--border);
            }

            .footer-title-block div:last-child {
                border-bottom: 0;
            }
        }
