:root {
    --bg: #0b0b0d;
    --bg-soft: #0f0f12;
    --card: #151518;
    --card-hover: #19191d;

    --border: #27272c;
    --border-light: #34343a;

    --text: #f5f5f5;
    --text-soft: #a1a1aa;
    --text-muted: #6f6f78;

    --accent: #b7ff4a;

    --max-width: 1200px;

    --bg-light: #f1f1ee;
    --text-light: #111114;
    --text-light-soft: #66666d;
    --border-light: #d7d7d2;
}


/* =========================
   RESET
========================= */

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


html {
    scroll-behavior: smooth;
}


body {
    background: var(--bg);
    color: var(--text);

    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    line-height: 1.6;

    -webkit-font-smoothing: antialiased;
}


body.modal-open {
    overflow: hidden;
}


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


button {
    font: inherit;
}


.container {
    width: min(
        calc(100% - 48px),
        var(--max-width)
    );

    margin: 0 auto;
}


/* =========================
   NAVIGATION
========================= */

.navbar {
    position: sticky;
    top: 0;
    z-index: 100;

    background: rgba(11, 11, 13, 0.82);

    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);

    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}


.nav-content {
    height: 78px;

    display: flex;
    align-items: center;
    justify-content: space-between;
}


.logo {
    font-size: 25px;
    font-weight: 800;

    letter-spacing: -1px;

    transition: opacity 0.2s ease;
}


.logo:hover {
    opacity: 0.75;
}


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


.nav-links {
    display: flex;
    align-items: center;

    gap: 32px;

    color: var(--text-soft);

    font-size: 14px;
}


.nav-links a {
    position: relative;

    transition: color 0.2s ease;
}


.nav-links a::after {
    content: "";

    position: absolute;

    left: 0;
    bottom: -8px;

    width: 0;
    height: 1px;

    background: var(--accent);

    transition: width 0.25s ease;
}


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


.nav-links a:hover::after {
    width: 100%;
}


.nav-button {
    padding: 10px 16px;

    border: 1px solid var(--border);

    border-radius: 7px;

    font-size: 14px;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;
}


.nav-button:hover {
    background: var(--text);
    border-color: var(--text);
    color: var(--bg);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 18px;
}

.language-switch {
    display: flex;
    align-items: center;
    gap: 6px;

    color: var(--text-muted);

    font-family: monospace;
    font-size: 12px;
}

.language-option {
    padding: 4px 2px;

    border: 0;
    background: transparent;

    color: var(--text-muted);

    font-family: inherit;
    font-size: inherit;
    font-weight: 600;

    cursor: pointer;

    transition:
        color 0.2s ease,
        opacity 0.2s ease;
}

.language-option:hover {
    color: var(--text);
}

.language-option.active {
    color: var(--accent);
}

.language-switch > span {
    opacity: 0.35;
}

/* =========================
   HERO
========================= */

.hero {
    position: relative;

    min-height: calc(100vh - 78px);

    display: flex;
    align-items: center;

    overflow: hidden;
}


.hero-grid {
    display: grid;

    grid-template-columns: 1.05fr 0.95fr;

    gap: 80px;

    align-items: center;
}


.hero-content {
    position: relative;
    z-index: 2;
}


.eyebrow {
    display: inline-flex;
    align-items: center;

    gap: 9px;

    color: var(--text-muted);

    font-size: 12px;
    font-weight: 600;

    text-transform: uppercase;
    letter-spacing: 2px;
}


.status-dot {
    width: 7px;
    height: 7px;

    flex-shrink: 0;

    border-radius: 50%;

    background: var(--accent);

    box-shadow: 0 0 14px var(--accent);
}


.hero h1 {
    margin-top: 20px;

    font-size: clamp(60px, 7vw, 100px);

    line-height: 0.96;

    letter-spacing: -5px;
}


.hero h1 span {
    display: inline-block;

    color: transparent;

    -webkit-text-stroke: 1px #777;
    text-shadow: 1px #777;
}


.hero-subtitle {
    max-width: 650px;

    margin-top: 32px;

    color: #dedee1;

    font-size: 26px;

    line-height: 1.35;

    letter-spacing: -0.7px;
}


.hero-description {
    max-width: 610px;

    margin-top: 18px;

    color: var(--text-soft);

    font-size: 16px;

    line-height: 1.75;
}


.hero-actions {
    display: flex;
    flex-wrap: wrap;

    gap: 12px;

    margin-top: 38px;
}


.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 12px;

    padding: 14px 20px;

    border-radius: 7px;

    font-size: 14px;
    font-weight: 600;

    cursor: pointer;

    transition:
        transform 0.2s ease,
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;
}


.button:hover {
    transform: translateY(-2px);
}


.button-primary {
    background: var(--text);
    color: var(--bg);
}


.button-primary:hover {
    background: var(--accent);
}


.button-secondary {
    border: 1px solid var(--border);

    background: transparent;

    color: var(--text-soft);
}


.button-secondary:hover {
    color: var(--text);

    border-color: var(--border-light);

    background: rgba(255, 255, 255, 0.02);
}


/* =========================
   CODE CARD
========================= */

.hero-visual {
    position: relative;
    z-index: 2;

    display: flex;
    justify-content: center;
}


.code-card {
    width: min(100%, 500px);

    overflow: hidden;

    border: 1px solid var(--border);

    border-radius: 14px;

    background:
        linear-gradient(
            145deg,
            #17171b,
            #0d0d0f
        );

    box-shadow:
        0 35px 90px rgba(0, 0, 0, 0.55);

    transform: rotate(2deg);

    transition:
        transform 0.4s ease,
        border-color 0.3s ease;
}


.code-card:hover {
    transform: rotate(0deg) translateY(-6px);

    border-color: var(--border-light);
}


.window-header {
    height: 48px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 18px;

    border-bottom: 1px solid var(--border);

    color: var(--text-muted);

    font-family: monospace;

    font-size: 12px;
}


.window-dots {
    display: flex;

    gap: 6px;
}


.window-dots span {
    width: 9px;
    height: 9px;

    border-radius: 50%;

    background: #444;
}


.code-content {
    padding: 32px;

    font-family:
        "SFMono-Regular",
        Consolas,
        "Liberation Mono",
        monospace;

    font-size: 14px;

    color: #ddd;

    line-height: 1.9;
}


.indent {
    padding-left: 25px;
}


.indent-2 {
    padding-left: 50px;
}


.code-purple {
    color: #c792ea;
}


.code-green {
    color: #b6e880;
}


.typewriter-cursor {
    color: var(--accent);
    animation: blink 0.5s steps(2) infinite;
    font-weight: 400;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}


.hero-glow {
    position: absolute;

    width: 400px;
    height: 400px;

    top: 10%;
    right: -200px;

    background: var(--accent);

    opacity: 0.04;

    filter: blur(100px);

    pointer-events: none;
}


/* =========================
   GENERAL SECTIONS
========================= */

.section {
    padding: 130px 0;
}


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


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


.section-heading {
    display: flex;
    align-items: center;

    gap: 20px;

    margin-bottom: 62px;
}


.section-heading span {
    color: var(--accent);

    font-family: monospace;

    font-size: 13px;
}


.section-heading h2 {
    font-size: 44px;

    line-height: 1;

    letter-spacing: -2px;
}


.section-intro {
    max-width: 680px;

    margin-top: -22px;
    margin-bottom: 62px;

    color: var(--text-soft);

    font-size: 17px;

    line-height: 1.75;
}

/* =========================
   ABOUT PHOTO
========================= */

.about-grid {
    display: grid;

    grid-template-columns: 0.75fr 1.25fr;

    gap: 90px;

    align-items: center;
}


.about-photo {
    position: relative;
    min-height: 470px;

    display: flex;
    align-items: flex-start;
    justify-content: center;

    overflow: hidden;
}

.about-photo img {
    position: relative;
    z-index: 1;

    width: min(100%, 375px);

    height: auto;

    transform: translateY(-30px);

    filter:
        saturate(90%);

    -webkit-mask-image:
        linear-gradient(
            to right,
            transparent 0%,
            black 10%,
            black 100%
        ),
        linear-gradient(
            to bottom,
            black 0%,
            black 78%,
            transparent 100%
        );

    -webkit-mask-composite: source-in;

    mask-image:
        linear-gradient(
            to right,
            transparent 0%,
            black 10%,
            black 100%
        ),
        linear-gradient(
            to bottom,
            black 0%,
            black 78%,
            transparent 100%
        );

    mask-composite: intersect;

    transition:
        transform 0.4s ease,
        filter 0.4s ease;
}


.about-text {
    max-width: 620px;

    align-self: center;

    color: var(--text-soft);

    font-size: 17px;

    line-height: 1.8;
}


.about-text h3 {
    max-width: 600px;

    margin-bottom: 34px;

    font-size: 48px;

    line-height: 1.03;

    letter-spacing: -2px;
}

.about-text p + p {
    margin-top: 20px;
}

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


/* =========================
   EDUCATION
========================= */

.timeline {
    border-top: 1px solid var(--border);
}


.timeline-item {
    display: grid;

    grid-template-columns: 190px 1fr;

    gap: 55px;

    padding: 42px 0;

    border-bottom: 1px solid var(--border);

    transition:
        background 0.25s ease,
        padding-left 0.25s ease;
}


.timeline-item:hover {
    background:
        linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.025),
            transparent 75%
        );

    padding-left: 16px;
}


.timeline-date {
    padding-top: 5px;

    color: var(--accent);

    font-family: monospace;

    font-size: 12px;

    letter-spacing: 0.5px;
}


.timeline-content {
    max-width: 780px;
}


.timeline-label {
    display: inline-block;

    margin-bottom: 10px;

    color: var(--text-muted);

    font-size: 11px;
    font-weight: 700;

    text-transform: uppercase;

    letter-spacing: 1.5px;
}


.timeline-content h3 {
    font-size: 28px;

    line-height: 1.15;

    letter-spacing: -0.8px;
}


.timeline-content h4 {
    margin-top: 8px;

    color: var(--text-soft);

    font-size: 17px;

    font-weight: 400;
}


.timeline-content p {
    margin-top: 18px;

    color: var(--text-soft);

    font-size: 15px;

    line-height: 1.75;
}


.thesis {
    padding: 13px 18px;

    border-left: 2px solid var(--accent);

    background: rgba(255, 255, 255, 0.018);

    color: #d5d5d8 !important;

    font-style: italic;
}


/* =========================
   PROJECTS
========================= */

.projects-grid {
    display: grid;

    grid-template-columns: repeat(2, 1fr);

    gap: 18px;
}


.project-card {
    min-height: 390px;

    padding: 30px;

    display: flex;
    flex-direction: column;

    border: 1px solid var(--border);

    border-radius: 14px;

    background: var(--card);

    transition:
        transform 0.25s ease,
        border-color 0.25s ease,
        background 0.25s ease;
}


.project-card:hover {
    transform: translateY(-6px);

    border-color: var(--border-light);

    background: var(--card-hover);
}


.project-card.featured {
    grid-column: span 2;

    min-height: 420px;
}

.project-card.featured .project-image {
    height: 300px;
}

.project-top {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;
}


.project-number {
    color: var(--text-muted);

    font-family: monospace;

    font-size: 13px;
}


.project-type {
    color: var(--accent);

    font-size: 11px;
    font-weight: 700;

    text-transform: uppercase;

    letter-spacing: 1.5px;
}


.project-links a {
    color: var(--text-soft);

    font-size: 13px;

    transition: color 0.2s ease;
}


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


.project-content {
    margin-top: 32px;

    display: flex;
    flex-direction: column;

    flex: 1;
}


.project-content h3 {
    margin-top: 10px;

    font-size: 30px;

    line-height: 1.15;

    letter-spacing: -1px;
}


.project-content p {
    max-width: 700px;

    margin-top: 14px;

    color: var(--text-soft);

    font-size: 15px;

    line-height: 1.75;
}


.tags {
    display: flex;
    flex-wrap: wrap;

    gap: 8px;

    margin-top: 24px;
}


.tags span {
    padding: 6px 10px;

    border: 1px solid var(--border);

    border-radius: 5px;

    color: var(--text-muted);

    font-family: monospace;

    font-size: 11px;
}


.project-more {
    display: inline-flex;
    align-items: center;

    margin-top: auto;
    padding: 28px 0 0;

    border: 0;
    background: transparent;

    color: var(--text);

    font-size: 14px;
    font-weight: 600;

    cursor: pointer;

    transition:
        color 0.2s ease,
        transform 0.2s ease;
}

.project-more:hover {
    color: var(--accent);
    transform: translateX(3px);
}


.projects-state {
    padding: 80px 20px;

    text-align: center;

    color: var(--text-muted);

    font-family: monospace;

    font-size: 13px;
}

/* =========================
   MODAL PROJECT MEDIA
========================= */

.modal-project-image {
    width: 100%;

    max-height: 420px;

    margin-bottom: 35px;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;

    border: 1px solid var(--border);

    border-radius: 10px;

    background: #0b0b0d;
}


.modal-project-image video,
.modal-project-image img {
    display: block;

    width: 100%;
    height: auto;

    max-width: 100%;
    max-height: 420px;

    object-fit: cover;
}

/* =========================================================
   SKILLS MAP
   ========================================================= */

.skills-map-section {
    overflow: hidden;
}


/* =========================================================
   MAP
   ========================================================= */

.skills-map {
    width: 100%;
}


/* =========================================================
   HEADER
   ========================================================= */

.skills-map-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 18px;

    font-family: monospace;
    font-size: 11px;

    letter-spacing: 1.5px;
    text-transform: uppercase;

    color: var(--text-muted);
}

.skills-map-header > span:first-child {
    color: var(--text-soft);
}

.skills-map-hint {
    font-size: 10px;

    letter-spacing: 0.6px;
    text-transform: none;
}


/* =========================================================
   CANVAS
   ========================================================= */

.skills-map-canvas {
    position: relative;

    width: 100%;

    border: 1px solid var(--border);

    background:
        radial-gradient(
            circle at 50% 50%,
            rgba(183, 255, 74, 0.045),
            transparent 34%
        ),
        var(--bg);

    overflow: hidden;
}


/* delikatna siatka */

.skills-map-canvas::before {
    content: "";

    position: absolute;

    inset: 0;

    pointer-events: none;

    background-image:
        linear-gradient(
            rgba(255, 255, 255, 0.018) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.018) 1px,
            transparent 1px
        );

    background-size: 40px 40px;

    mask-image:
        radial-gradient(
            circle at center,
            black 0%,
            transparent 75%
        );

    opacity: 0.5;
}


/* =========================================================
   SVG
   ========================================================= */

#skills-map-svg {
    display: block;

    width: 100%;
    height: auto;

    min-height: 680px;
}


/* =========================================================
   CONNECTIONS
   ========================================================= */

.skills-map-connection {
    fill: none;

    stroke: var(--border);

    stroke-width: 1;

    opacity: 0.35;

    transition:
        stroke 0.25s ease,
        stroke-width 0.25s ease,
        opacity 0.25s ease;
}


/* DAWID → SEKTOR */

.skills-sector-connection {
    stroke: var(--border-light);

    stroke-width: 1;

    opacity: 0.45;
}


/* SEKTOR → TECHNOLOGIA */

.skills-technology-connection {
    stroke: var(--border);

    stroke-width: 1;

    opacity: 0.35;
}


/* TECHNOLOGIA → PROJEKT */

.skills-project-connection {
    stroke: var(--accent);

    stroke-width: 1;

    opacity: 0.75;
}


/* aktywne połączenie */

.skills-map-connection.active {
    stroke: var(--accent);

    stroke-width: 2;

    opacity: 1;

    filter: url(#skills-glow);
}


/* połączenie aktywnego sektora */

.skills-map-connection.sector-active {
    opacity: 0.5;
}


/* przygaszone */

.skills-map-connection.dimmed {
    opacity: 0.08;
}


/* =========================================================
   SECTORS
   ========================================================= */

.skills-map-sector {
    cursor: pointer;

    opacity: 1;

    transition:
        opacity 0.25s ease;
}


/* punkt sektora */

.skills-sector-dot {
    fill: var(--card);

    stroke: var(--text-muted);

    stroke-width: 1.5;

    transition:
        fill 0.25s ease,
        stroke 0.25s ease,
        filter 0.25s ease;
}


/* nazwa sektora */

.skills-sector-label {
    fill: var(--text-soft);

    font-family: monospace;

    font-size: 12px;

    font-weight: 600;

    letter-spacing: 1.6px;

    pointer-events: none;

    transition:
        fill 0.25s ease,
        opacity 0.25s ease;
}


/* obszar hover */

.skills-sector-hit {
    fill: transparent;

    stroke: none;

    cursor: pointer;
}


/* aktywny sektor */

.skills-map-sector.active {
    opacity: 1;
}

.skills-map-sector.active .skills-sector-dot {
    fill: rgba(183, 255, 74, 0.08);

    stroke: var(--accent);

    stroke-width: 2;

    filter: url(#skills-glow);
}

.skills-map-sector.active .skills-sector-label {
    fill: var(--accent);
}


/* przygaszony sektor */

.skills-map-sector.dimmed {
    opacity: 0.25;
}


/* =========================================================
   TECHNOLOGIES
   ========================================================= */

.skills-map-technology {
    cursor: pointer;

    opacity: 1;

    transition:
        opacity 0.25s ease;
}


/* punkt technologii */

.skills-technology-dot {
    fill: var(--card);

    stroke: var(--text-soft);

    stroke-width: 1.5;

    transition:
        fill 0.25s ease,
        stroke 0.25s ease,
        filter 0.25s ease;
}


/* tekst technologii */

.skills-technology-label {
    fill: var(--text);

    font-family: monospace;

    font-size: 11px;

    font-weight: 500;

    letter-spacing: 0.2px;

    pointer-events: none;

    transition:
        fill 0.25s ease,
        opacity 0.25s ease;
}


/* większy niewidzialny obszar hover */

.skills-technology-hit {
    fill: transparent;

    stroke: none;

    cursor: pointer;
}


/* =========================================================
   TECHNOLOGY — SECTOR HOVER
   ========================================================= */

.skills-map-technology.sector-active {
    opacity: 1;
}

.skills-map-technology.sector-active .skills-technology-dot {
    stroke: var(--accent);
}

.skills-map-technology.sector-active .skills-technology-label {
    fill: var(--text);
}


/* =========================================================
   TECHNOLOGY — ACTIVE
   ========================================================= */

.skills-map-technology.active {
    opacity: 1;
}

.skills-map-technology.active .skills-technology-dot {
    fill: rgba(183, 255, 74, 0.12);

    stroke: var(--accent);

    stroke-width: 2.5;

    filter: url(#skills-glow);
}

.skills-map-technology.active .skills-technology-label {
    fill: var(--accent);

    font-weight: 600;
}


/* =========================================================
   TECHNOLOGY — DIMMED
   ========================================================= */

.skills-map-technology.dimmed {
    opacity: 0.1;
}

.skills-map-technology.dimmed .skills-technology-label,
.skills-map-technology.dimmed .skills-technology-dot {
    opacity: 0.1;
}


/* =========================================================
   PROJECTS
   ========================================================= */

.skills-map-project {
    pointer-events: none;

    opacity: 0;

    animation:
        skills-project-in 0.25s ease forwards;
}


@keyframes skills-project-in {

    from {
        opacity: 0;
        transform: translateY(4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }

}


/* punkt projektu */

.skills-project-dot {
    fill: var(--accent);

    stroke: var(--bg);

    stroke-width: 2;

    filter: url(#skills-glow);
}


/* nazwa projektu */

.skills-project-label {
    fill: var(--text);

    font-family: monospace;

    font-size: 10px;

    font-weight: 500;

    letter-spacing: 0.2px;

    white-space: nowrap;
}


/* =========================================================
   CENTER
   ========================================================= */

.skills-map-center {
    pointer-events: none;
}


/* zewnętrzny ring */

.skills-center-ring-outer {
    fill: none;

    stroke: var(--border-light);

    stroke-width: 1;

    opacity: 0.7;
}


/* wewnętrzny ring */

.skills-center-ring-inner {
    fill: var(--card);

    stroke: var(--accent);

    stroke-width: 1.5;

    opacity: 0.95;

    transition:
        filter 0.25s ease;
}


/* DAWID */

.skills-center-name {
    fill: var(--text);

    font-family: monospace;

    font-size: 18px;

    font-weight: 700;

    letter-spacing: 2px;
}


/* DEVELOPER */

.skills-center-role {
    fill: var(--text-muted);

    font-family: monospace;

    font-size: 9px;

    font-weight: 500;

    letter-spacing: 2px;
}


/* centrum przy aktywnej technologii */

#skills-map-svg.technology-active
.skills-center-ring-inner {
    filter: url(#skills-glow);
}


/* =========================================================
   DETAILS
   ========================================================= */

.skills-map-details {
    position: absolute;

    left: 28px;
    bottom: 24px;

    min-width: 190px;

    pointer-events: none;
}


/* placeholder */

.skills-details-placeholder {
    display: flex;

    align-items: center;

    gap: 10px;

    color: var(--text-muted);

    font-family: monospace;

    font-size: 10px;

    letter-spacing: 0.6px;
}


/* kreska */

.skills-details-line {
    display: block;

    width: 20px;
    height: 1px;

    background: var(--border-light);
}


/* aktywny panel */

.skills-details-content {
    display: flex;

    flex-direction: column;

    gap: 5px;

    padding-left: 12px;

    border-left: 1px solid var(--accent);
}


/* kategoria */

.skills-details-category {
    color: var(--text-muted);

    font-family: monospace;

    font-size: 9px;

    letter-spacing: 1.2px;
}


/* technologia */

.skills-details-title {
    color: var(--accent);

    font-family: monospace;

    font-size: 14px;

    font-weight: 600;
}


/* projekty */

.skills-details-projects {
    color: var(--text-soft);

    font-family: monospace;

    font-size: 10px;
}


/* =========================================================
   TECHNOLOGY ACTIVE STATE
   ========================================================= */

/* sektory poza aktywnym */

#skills-map-svg.technology-active
.skills-map-sector.dimmed {
    opacity: 0.65;
}


/* technologie poza aktywnym sektorem */

#skills-map-svg.technology-active
.skills-map-technology.dimmed {
    opacity: 0.45;
}


/* linie poza aktywnym sektorem */

#skills-map-svg.technology-active
.skills-map-connection.dimmed {
    opacity: 0.08;
}


/* aktywny sektor */

#skills-map-svg.technology-active
.skills-map-sector.active {
    opacity: 1;
}


/* aktywna technologia */

#skills-map-svg.technology-active
.skills-map-technology.active {
    opacity: 1;
}


/* =========================================================
   SECTOR ACTIVE STATE
   ========================================================= */

#skills-map-svg.sector-active
.skills-map-sector.dimmed {
    opacity: 0.25;
}

#skills-map-svg.sector-active
.skills-map-technology.dimmed {
    opacity: 0.55;
}

#skills-map-svg.sector-active
.skills-map-connection.dimmed {
    opacity: 0.1;
}


/*
    Hover sektora nie powoduje mocnego glow.
*/

#skills-map-svg.sector-active
.skills-map-connection.sector-active {
    stroke: var(--border-light);

    opacity: 0.5;

    filter: none;
}


/* =========================================================
   SKILLS MAP — MOBILE
========================================================= */

@media (max-width: 700px) {

    .skills-map-header {
        margin-bottom: 14px;
        gap: 6px;
    }

    .skills-map-header > span:first-child {
        font-size: 10px;
    }

    .skills-map-hint {
        font-size: 9px;
        line-height: 1.5;
    }

    .skills-map-canvas {
        border-radius: 10px;
    }

    #skills-map-svg {
        width: 100%;
        height: auto;
        min-height: 0;
    }

    .skills-sector-label {
        font-size: 9px;
        letter-spacing: 1px;
    }

    .skills-technology-label {
        font-size: 9px;
    }

    .skills-project-label {
        font-size: 8px;
    }

    .skills-center-name {
        font-size: 16px;
    }

    .skills-center-role {
        font-size: 8px;
    }

    .skills-map-details {
        left: 18px;
        bottom: 16px;
    }
}


@media (max-width: 500px) {

    .skills-map-header {
        margin-bottom: 12px;
    }

    .skills-map-canvas {
        border-radius: 8px;
    }

    #skills-map-svg {
        min-height: 0;
    }

    .skills-sector-label {
        font-size: 8px;
        letter-spacing: 0.8px;
    }

    .skills-technology-label {
        font-size: 8px;
    }

    .skills-project-label {
        font-size: 7px;
    }

    .skills-center-name {
        font-size: 15px;
    }

    .skills-center-role {
        font-size: 7px;
    }

    .skills-map-details {
        display: none;
    }
}

/* =========================================================
   EXPERIENCE — TREE TIMELINE
========================================================= */

.experience-timeline {
    position: relative;
    width: 100%;
    max-width: 1100px;
    margin: 70px auto 0;
    padding: 60px 0 100px;
}



/* =========================================================
   PIEŃ
========================================================= */

.experience-timeline::before {
    content: "";
    position: absolute;
    top: 80px;
    bottom: 120px;
    left: 50%;
    width: 8px;
    transform: translateX(-50%);
    background: linear-gradient(
        to bottom,
        transparent 0%,
        var(--accent) 8%,
        var(--accent) 92%,
        transparent 100%
    );
    border-radius: 999px;
    box-shadow:
        0 0 10px rgba(183, 255, 74, 0.25),
        0 0 25px rgba(183, 255, 74, 0.08);
    z-index: 0;
}



/* =========================================================
   ELEMENT
========================================================= */

.experience-item {
    position: relative;
    display: block;
    width: 50%;
    min-height: 0;
    margin: 0;
    margin-bottom: -90px;
}

.experience-item:last-child {
    margin-bottom: 0;
}


/* =========================================================
   LEWA / PRAWA STRONA
========================================================= */

.experience-item-left {
    margin-left: 0;
    margin-right: auto;

    padding-right: 80px;
}

.experience-item-right {
    margin-left: 50%;

    padding-left: 80px;
}


/* =========================================================
   KARTA
========================================================= */

.experience-content {
    position: relative;

    padding: 28px 30px;

    border: 1px solid var(--border);
    border-radius: 14px;

    background: var(--card);

    z-index: 2;

    transition:
        transform 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease;
}


.experience-content:hover {
    transform: translateY(-4px);

    border-color: var(--accent);

    box-shadow:
        0 12px 35px rgba(0, 0, 0, 0.25);
}


/* =========================================================
   PIERŚCIEŃ Z DATĄ
========================================================= */

.experience-date {
    position: absolute !important;

    top: 50% !important;
    left: 100% !important;

    transform: translate(-50%, -50%) !important;

    width: 96px;
    height: 96px;

    display: flex !important;

    align-items: center;
    justify-content: center;

    padding: 10px !important;

    border: 6px solid var(--accent);
    border-radius: 50%;

    /*
       ŚRODEK PIERŚCIENIA ZAKRYWA PIEŃ.
       --bg-soft = tło całej sekcji Experience.
    */
    background: var(--bg-soft);

    color: var(--text);

    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 700;

    line-height: 1.25;

    text-align: center;

    white-space: normal;

    /*
       Pień = 0
       gałąź = 1
       karta = 2
       pierścień = 10
    */
    z-index: 10 !important;
}


/* prawa strona */

.experience-item-right .experience-date {
    left: 0 !important;
}


/* =========================================================
   USUWAMY STARE KROPKI
========================================================= */

.experience-dot {
    display: none !important;
}


/* =========================================================
   GAŁĘZIE
========================================================= */

.experience-item-left::after,
.experience-item-right::after {
    content: "";
    position: absolute;
    top: 50%;
    height: 6px;
    width: 90px;
    transform: translateY(-50%);
    background: linear-gradient(
        to right,
        transparent,
        var(--accent)
    );
    border-radius: 999px;
    box-shadow: 0 0 10px rgba(183, 255, 74, 0.2);
    z-index: 1;
}

.experience-item-left::after {
    right: -10px;
}

.experience-item-right::after {
    left: -10px;
    background: linear-gradient(
        to left,
        transparent,
        var(--accent)
    );
}


/* =========================================================
   ZAWARTOŚĆ
========================================================= */

.experience-content .timeline-label {
    display: inline-block;

    margin-bottom: 12px;

    padding: 5px 11px;

    border: 1px solid var(--border);
    border-radius: 999px;

    color: var(--accent);

    font-size: 0.75rem;
    font-weight: 600;

    line-height: 1.3;
}


.experience-content h3 {
    margin: 0 0 14px;

    font-size: 1.25rem;
    line-height: 1.3;
}


.experience-content p {
    margin: 0 0 12px;

    color: var(--text-soft);

    line-height: 1.7;
}


.experience-content p:last-child {
    margin-bottom: 0;
}


.experience-item-left .experience-content,
.experience-item-right .experience-content {
    text-align: left;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 800px) {

    .experience-timeline {
        margin-top: 50px;
        padding: 40px 0 70px 0;
    }

    /* PIEŃ MAKSYMALNIE Z LEWEJ */
    .experience-timeline::before {
        left: 12px;
        top: 50px;
        bottom: 100px;
        width: 8px;
        transform: translateX(-50%);
        border-radius: 999px;
    }

    /* KAŻDA KARTA PO PRAWEJ */
    .experience-timeline .experience-item,
    .experience-timeline .experience-item-left,
    .experience-timeline .experience-item-right {
        display: block;
        width: 100%;

        margin-left: 0;
        margin-right: 0;

        padding-left: 62px;
        padding-right: 0;

        margin-bottom: 35px;
    }

    .experience-timeline .experience-item:last-child {
        margin-bottom: 0;
    }

    /* PIERŚCIEŃ */
    .experience-timeline .experience-item-left .experience-date,
    .experience-timeline .experience-item-right .experience-date {
        position: absolute !important;

        left: 12px !important;
        top: 50% !important;

        width: 70px;
        height: 70px;

        transform: translate(-50%, -50%) !important;

        padding: 7px !important;

        border: 5px solid var(--accent);
        border-radius: 50%;

        background: var(--bg-soft);

        font-size: 0.62rem;
        line-height: 1.2;

        z-index: 10 !important;
    }

    /*
       GAŁĄŹ OD PIENIA DO KARTY
       zaczyna się dokładnie przy pniu
       i kończy pod kartą
    */
    .experience-timeline .experience-item-left::after,
    .experience-timeline .experience-item-right::after {
        content: "";

        position: absolute;

        left: 12px;
        right: auto;

        top: 50%;

        width: 62px;
        height: 7px;

        transform: translateY(-50%);

        border-radius: 999px;

        background: linear-gradient(
            to right,
            var(--accent),
            transparent
        );

        z-index: 1;
    }

    .experience-timeline .experience-content {
        position: relative;
        z-index: 2;
        padding: 22px;
    }

    .experience-timeline .experience-content h3 {
        font-size: 1.15rem;
    }

    .experience-timeline .experience-content p {
        line-height: 1.6;
    }
}


@media (max-width: 520px) {

    .experience-timeline {
        padding-left: 0;
    }

    .experience-timeline::before {
        left: 10px;
    }

    .experience-timeline .experience-item,
    .experience-timeline .experience-item-left,
    .experience-timeline .experience-item-right {
        padding-left: 54px;
    }

    .experience-timeline .experience-item-left .experience-date,
    .experience-timeline .experience-item-right .experience-date {
        left: 10px !important;

        width: 64px;
        height: 64px;

        border-width: 5px;
        font-size: 0.58rem;
    }

    .experience-timeline .experience-item-left::after,
    .experience-timeline .experience-item-right::after {
        left: 10px;
        width: 54px;
        height: 6px;
    }
}


/* =========================
   VALUES
========================= */

.values-grid {
    display: grid;

    grid-template-columns: repeat(3, 1fr);

    border-top: 1px solid var(--border);
    border-left: 1px solid var(--border);
}


.value-card {
    min-height: 240px;

    padding: 30px;

    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);

    transition:
        background 0.25s ease;
}


.value-card:hover {
    background: var(--card);
}


.value-card > span {
    color: var(--accent);

    font-family: monospace;

    font-size: 11px;
}


.value-card h3 {
    margin-top: 55px;

    font-size: 25px;

    letter-spacing: -0.7px;
}


.value-card p {
    margin-top: 12px;

    color: var(--text-muted);

    font-size: 14px;

    line-height: 1.7;
}

/* =========================
   LANGUAGES
========================= */

.section-languages {
    padding-top: 100px;
    padding-bottom: 110px;
}


.languages-list {
    max-width: 850px;

    border-top: 1px solid var(--border);
}


.language-item {
    min-height: 105px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 30px;

    padding: 25px 0;

    border-bottom: 1px solid var(--border);

    transition:
        padding-left 0.25s ease,
        background 0.25s ease;
}


.language-item:hover {
    padding-left: 14px;

    background:
        linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.025),
            transparent 80%
        );
}


.language-name {
    display: flex;
    align-items: center;

    gap: 18px;
}


.language-flag {
    width: 34px;
    height: 24px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    overflow: hidden;

    border: 1px solid rgba(255, 255, 255, 0.14);

    border-radius: 4px;

    background: #111;
}


.language-flag svg {
    display: block;

    width: 100%;
    height: 100%;
}


.language-name strong {
    font-size: 22px;

    font-weight: 500;

    letter-spacing: -0.4px;
}


.language-level {
    color: var(--accent);

    font-family: monospace;

    font-size: 13px;
    font-weight: 600;

    letter-spacing: 0.3px;
}


@media (max-width: 600px) {

    .section-languages {
        padding-top: 80px;
        padding-bottom: 90px;
    }


    .language-item {
        min-height: 90px;
    }


    .language-name {
        gap: 14px;
    }


    .language-flag {
        width: 30px;
        height: 21px;

        border-radius: 3px;
    }


    .language-name strong {
        font-size: 19px;
    }

}


/* =========================
   CONTACT
========================= */

.contact-section {
    padding-bottom: 110px;
}


.contact-box {
    position: relative;

    overflow: hidden;

    padding: 85px 60px;

    border: 1px solid var(--border);

    border-radius: 16px;

    background:
        radial-gradient(
            circle at top right,
            rgba(183, 255, 74, 0.08),
            transparent 35%
        ),
        var(--card);

    text-align: center;
}


.contact-box h2 {
    position: relative;

    margin-top: 20px;

    font-size: clamp(45px, 5vw, 68px);

    line-height: 1;

    letter-spacing: -3px;
}


.contact-box > p {
    position: relative;

    max-width: 620px;

    margin: 25px auto 30px;

    color: var(--text-soft);

    font-size: 16px;

    line-height: 1.75;
}


.contact-actions {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-wrap: wrap;

    gap: 10px;
}


.contact-location {
    position: relative;

    margin-top: 25px;

    color: var(--text-muted);

    font-family: monospace;

    font-size: 12px;
}


/* =========================
   PROJECT MODAL
========================= */

.project-modal[hidden] {
    display: none;
}


.project-modal {
    position: fixed;

    inset: 0;

    z-index: 1000;

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 30px;
}


.project-modal-overlay {
    position: absolute;

    inset: 0;

    background: rgba(0, 0, 0, 0.75);

    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}


.project-modal-content {
    position: relative;

    z-index: 2;

    width: min(100%, 950px);

    max-height: 90vh;

    overflow-y: auto;

    padding: 55px;

    border: 1px solid var(--border);

    border-radius: 18px;

    background: #121215;

    box-shadow:
        0 40px 100px rgba(0, 0, 0, 0.7);

    animation: modal-in 0.25s ease;
}


@keyframes modal-in {

    from {
        opacity: 0;

        transform:
            translateY(20px)
            scale(0.98);
    }

    to {
        opacity: 1;

        transform:
            translateY(0)
            scale(1);
    }

}


.modal-close {
    position: absolute;

    top: 20px;
    right: 22px;

    width: 40px;
    height: 40px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid var(--border);

    border-radius: 50%;

    background: transparent;

    color: var(--text-soft);

    font-size: 25px;

    line-height: 1;

    cursor: pointer;

    transition:
        color 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease;
}


.modal-close:hover {
    color: var(--text);

    border-color: var(--border-light);

    background: rgba(255, 255, 255, 0.03);
}


.modal-title {
    max-width: 800px;

    margin-top: 12px;

    font-size: clamp(40px, 6vw, 70px);

    line-height: 1;

    letter-spacing: -3px;
}


.modal-description {
    max-width: 700px;

    margin-top: 25px;

    color: var(--text-soft);

    font-size: 18px;

    line-height: 1.65;
}


.modal-divider {
    height: 1px;

    margin: 45px 0;

    background: var(--border);
}


.modal-layout {
    display: grid;

    grid-template-columns: 1.5fr 0.7fr;

    gap: 80px;
}


.modal-layout h3 {
    margin-bottom: 18px;

    color: var(--text-muted);

    font-size: 13px;
    font-weight: 700;

    text-transform: uppercase;

    letter-spacing: 1.5px;
}


.modal-text {
    color: var(--text-soft);

    font-size: 16px;

    text-align: justify;
    text-justify: inter-word;


    line-height: 1.8;
}


.modal-layout aside {
    display: flex;

    flex-direction: column;

    align-items: flex-start;
}


.modal-actions {
    display: flex;

    flex-wrap: wrap;

    gap: 10px;

    margin-top: 30px;
}

/* =========================
   PROJECT MEDIA
========================= */

.project-image {
    width: calc(100% + 60px);

    height: 180px;

    margin: -30px -30px 30px;

    overflow: hidden;

    border-bottom: 1px solid var(--border);

    background: #0b0b0d;
}


.project-image img,
.project-image video {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;
}


.project-image video {
    pointer-events: none;
}


.project-card:hover .project-image img,
.project-card:hover .project-image video {
    transform: scale(1.03);
}


.project-image img,
.project-image video {
    transition:
        transform 0.5s ease;
}


@media (max-width: 800px) {

    .project-image {
        width: calc(100% + 50px);

        height: 240px;

        margin: -25px -25px 25px;
    }

}



/* =========================
   FOOTER
========================= */

footer {
    border-top: 1px solid var(--border);
}


.footer-content {
    min-height: 90px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    color: var(--text-muted);

    font-size: 13px;
}


.footer-content div {
    display: flex;

    gap: 24px;
}


.footer-content a {
    transition: color 0.2s ease;
}


.footer-content a:hover {
    color: var(--text);
}


/* =========================
   RESPONSIVE — TABLET
========================= */

@media (max-width: 1000px) {

    .hero-grid {
        gap: 50px;
    }


    .nav-links {
        gap: 22px;
    }


    .about-grid {
        gap: 60px;
    }


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

}


/* =========================
   RESPONSIVE — MOBILE
========================= */

@media (max-width: 800px) {

    .container {
        width: min(
            calc(100% - 30px),
            var(--max-width)
        );
    }


    .nav-links {
        display: none;
    }


    .nav-button {
        display: none;
    }


    .hero {
        min-height: auto;

        padding: 95px 0 80px;
    }


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

        gap: 60px;
    }


    .hero h1 {
        font-size: 66px;

        letter-spacing: -4px;
    }


    .hero-subtitle {
        font-size: 22px;
    }


    .hero-description {
        font-size: 15px;
    }


    .hero-visual {
        padding: 0 10px;
    }


    .code-card {
        transform: rotate(1deg);
    }


    .section {
        padding: 95px 0;
    }


    .section-heading {
        margin-bottom: 48px;
    }


    .section-heading h2 {
        font-size: 38px;
    }


    .section-intro {
        margin-top: -12px;

        margin-bottom: 45px;
    }


    .about-grid {
        grid-template-columns: 1fr;

        gap: 45px;
    }


    .about-photo {
        min-height: 360px;
    }


    .about-photo img {
        width: min(100%, 330px);
    }


    .about-text h3 {
        margin-bottom: 28px;

        font-size: 40px;
    }


    .timeline-item,
    .experience-item {
        grid-template-columns: 1fr;

        gap: 10px;

        padding: 30px 0;
    }


    .timeline-item:hover,
    .experience-item:hover {
        padding-left: 10px;
    }


    .timeline-date,
    .experience-date {
        padding-top: 0;
    }


    .timeline-content h3,
    .experience-content h3 {
        font-size: 24px;
    }


    .timeline-content h4 {
        font-size: 16px;
    }


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


    .project-card.featured {
        grid-column: auto;
    }


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


    .skills-extra {
        grid-template-columns: 1fr;
    }


    .skills-extra-column {
        border-right: 0;

        border-bottom: 1px solid var(--border);
    }


    .skills-extra-column:last-child {
        border-bottom: 0;
    }



    .languages-bar {
        grid-template-columns: 1fr;
    }


    .languages-title,
    .language-item {
        min-height: auto;

        padding: 22px;
    }


    .language-item {
        border-left: 0;

        border-top: 1px solid var(--border);
    }


    .contact-box {
        padding: 65px 25px;
    }


    .contact-box h2 {
        font-size: 45px;
    }


    .project-modal {
        padding: 15px;
    }


    .project-modal-content {
        max-height: 95vh;

        padding: 50px 25px 35px;
    }


    .modal-layout {
        grid-template-columns: 1fr;

        gap: 45px;
    }

}


/* =========================
   RESPONSIVE — SMALL MOBILE
========================= */

@media (max-width: 520px) {

    .hero h1 {
        font-size: 55px;

        letter-spacing: -3px;
    }


    .hero-subtitle {
        font-size: 20px;
    }


    .hero-actions {
        flex-direction: column;

        align-items: stretch;
    }


    .button {
        width: 100%;
    }


    .code-content {
        padding: 22px;

        font-size: 11px;
    }


    .section-heading {
        gap: 14px;
    }


    .section-heading h2 {
        font-size: 34px;
    }


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


    .project-card {
        min-height: 350px;

        padding: 25px;
    }


    .project-content h3 {
        font-size: 26px;
    }


    .contact-box h2 {
        font-size: 39px;

        letter-spacing: -2px;
    }


    .contact-actions {
        flex-direction: column;

        align-items: stretch;
    }


    .footer-content {
        flex-direction: column;

        justify-content: center;

        gap: 12px;
    }

}

main {
    counter-reset: section;
}

main > .section {
    counter-increment: section;
}

main > .section .section-eyebrow::before {
    content: counter(section, decimal-leading-zero);
}

/* =========================================================
   PROJECT FILTERS
   ========================================================= */

.section-projects .section-intro {
    margin-bottom: 34px;
}

.project-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 30px;

    margin-bottom: 42px;
}

.project-filter {
    position: relative;

    padding: 8px 0 10px;

    border: 0;
    background: transparent;

    color: var(--text-muted);

    font-family: monospace;
    font-size: 12px;
    font-weight: 700;

    text-transform: uppercase;
    letter-spacing: 1.2px;

    cursor: pointer;

    transition:
        color 0.2s ease,
        opacity 0.2s ease;
}

.project-filter::after {
    content: "";

    position: absolute;

    left: 0;
    right: 0;
    bottom: 0;

    height: 2px;

    border-radius: 999px;

    background: var(--accent);

    transform: scaleX(0);
    transform-origin: left;

    transition: transform 0.22s ease;
}

.project-filter:hover {
    color: var(--text);
}

.project-filter.active {
    color: var(--text);
}

.project-filter.active::after {
    transform: scaleX(1);
}

.project-filter:focus-visible {
    outline: 1px solid var(--accent);
    outline-offset: 5px;
    border-radius: 2px;
}

.projects-state-grid {
    grid-column: 1 / -1;
}

.project-card {
    animation: project-card-in 0.28s ease both;
}

@keyframes project-card-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .project-card {
        animation: none;
    }
}

@media (max-width: 800px) {

    .section-projects .section-intro {
        margin-bottom: 28px;
    }

    .project-filters {
        flex-wrap: nowrap;
        gap: 24px;

        margin-right: -15px;
        margin-bottom: 34px;
        padding-right: 15px;
        padding-bottom: 2px;

        overflow-x: auto;
        overscroll-behavior-x: contain;
        scrollbar-width: none;
    }

    .project-filters::-webkit-scrollbar {
        display: none;
    }

    .project-filter {
        flex: 0 0 auto;
    }
}

@media (max-width: 520px) {

    .project-filters {
        gap: 20px;
        margin-bottom: 30px;
    }

    .project-filter {
        font-size: 10px;
        letter-spacing: 1px;
    }
}

.project-card-tags {
    width: 100%;

    flex-wrap: nowrap;
    overflow: hidden;
}

.project-card-tags .tag {
    flex-shrink: 0;
}

.project-card-tags .tag-more {
    flex-shrink: 0;

    color: var(--text-muted);
    border-color: var(--border);
}

@media (max-width: 600px) {

    /* =================================
       PROJECTS — FULL SCREEN WIDTH
    ================================= */

    .section-projects > .container {
        width: 100%;
        max-width: none;
    }


    /* Teksty nadal z normalnym marginesem */

    .section-projects .section-heading,
    .section-projects .section-intro,
    .section-projects .project-filters {
        margin-left: 15px;
        margin-right: 15px;
    }


    /* Grid dokładnie na szerokość rodzica */

    .section-projects .projects-grid {
        width: 100%;

        grid-template-columns:
            minmax(0, 1fr);

        margin-left: 0;
        margin-right: 0;
    }


    /* Karta nie może rozszerzyć grida */

    .section-projects .project-card {
        width: 100%;
        max-width: 100%;
        min-width: 0;

        border-left: 0;
        border-right: 0;
        border-radius: 0;
    }


    /* Bardzo ważne przy flex/grid */

    .section-projects .project-content,
    .section-projects .project-top,
    .section-projects .project-card-tags {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }


    /* Media dokładnie od krawędzi do krawędzi karty */

    .section-projects .project-image {
        width: auto;
        max-width: none;

        margin:
            -25px
            -25px
            25px;
    }


    .section-projects .project-image img,
    .section-projects .project-image video {
        width: 100%;
        max-width: 100%;
    }
}

