reference-gallery {
    display: block;
}

/* The hero uses the same type scale and background as the other marketing pages. */

.cs-page .cs-portfolio-hero .sc-hero-grid {
    grid-template-columns: 1.05fr 1fr;
    gap: 52px;
}

.cs-page .cs-portfolio-hero h1 {
    font-size: var(--site-hero-heading-size);
    font-weight: 650;
    line-height: 1.07;
    letter-spacing: 0;
    margin-bottom: 26px;
}

.cs-portfolio-hero h1 em {
    display: inline;
    font-style: normal;
    background: linear-gradient(110deg, #008ed4, #2c4faa);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

.cs-page .cs-portfolio-hero .sc-eyebrow {
    color: var(--sc-muted);
}

.cs-page .cs-portfolio-hero .sc-lead {
    font-size: 16px;
    line-height: 1.8;
}

.cs-page .cs-portfolio-hero .cs-text-link {
    margin: 0;
    padding: 12px 0;
    font-size: 13px;
    color: var(--sc-ink);
}

.cs-page .cs-portfolio-hero__footnote {
    margin-top: 24px;
    font-size: 12px;
}

.cs-portfolio-hero__visual {
    position: relative;
    min-width: 0;
    height: 510px;
    isolation: isolate;
}

.cs-portfolio-hero__circle {
    position: absolute;
    inset: 20px -20px 15px 15px;
    border: 1px solid var(--sc-line);
    border-radius: 50%;
    background: radial-gradient(circle, var(--sc-tint), transparent 70%);
    z-index: -1;
}

.cs-portfolio-hero__circle::before {
    content: '';
    position: absolute;
    inset: 45px;
    border: 1px solid var(--sc-line);
    border-radius: 50%;
}

.cs-portfolio-hero__window {
    position: absolute;
    width: 92%;
}

.cs-portfolio-hero__window--1 {
    top: 22px;
    left: -1%;
    transform: rotate(-7deg);
}

.cs-portfolio-hero__window--2 {
    top: 190px;
    right: -4%;
    width: 82%;
    transform: rotate(6deg);
}

.cs-portfolio-hero__window[data-reference-mode] .cs-mockup-scene {
    aspect-ratio: auto;
    overflow: visible;
    padding: 0;
    background: transparent;
}

.cs-portfolio-hero__window .cs-mockup-scene::before,
.cs-portfolio-hero__window .cs-mockup-keyboard {
    display: none;
}

.cs-portfolio-hero__window .cs-mockup-laptop {
    width: 100%;
    transform: none;
}

/* Brand colors belong to reference scenes; page chrome stays in the gray palette. */

.cs-mockup-gastro-pruvodce {
    --ref-light-top: #faebe7;
    --ref-light-bottom: #e9c5be;
    --ref-dark-top: #2e1e20;
    --ref-dark-bottom: #512729;
    --ref-glow: #db6860;
}

.cs-mockup-barum-czech-rally {
    --ref-light-top: #e9eff9;
    --ref-light-bottom: #bdcce5;
    --ref-dark-top: #142338;
    --ref-dark-bottom: #294d7a;
    --ref-glow: #d8df60;
}

.cs-mockup-joblix {
    --ref-light-top: #fff0f5;
    --ref-light-bottom: #edd5e3;
    --ref-dark-top: #2b1b2c;
    --ref-dark-bottom: #4a263e;
    --ref-glow: #da6ca0;
}

.cs-mockup-evidence-psu {
    --ref-light-top: #edf0ff;
    --ref-light-bottom: #ccd4f8;
    --ref-dark-top: #172036;
    --ref-dark-bottom: #2b3b77;
    --ref-glow: #6a7be7;
}

.cs-mockup-charlies-fork {
    --ref-light-top: #f4e7df;
    --ref-light-bottom: #d9c3b7;
    --ref-dark-top: #251b18;
    --ref-dark-bottom: #51342e;
    --ref-glow: #b6786c;
}

.cs-mockup-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 48px 30px;
    align-items: start;
}

.cs-projects {
    padding-top: 32px;
}

.cs-mockup-card {
    min-width: 0;
}

.cs-mockup-visual {
    overflow: hidden;
    border: 1px solid var(--sc-line);
    border-radius: 24px;
    transition: border-color .2s;
}

.cs-mockup-open {
    position: relative;
    display: block;
    width: 100%;
    border: 0;
    padding: 0;
    background: transparent;
    text-align: left;
}

.cs-mockup-scene {
    position: relative;
    display: grid;
    place-items: center;
    width: 100%;
    aspect-ratio: 1.4;
    padding: 38px 20px;
    perspective: 1400px;
    overflow: hidden;
    isolation: isolate;
    background: linear-gradient(140deg, var(--ref-light-top), var(--ref-light-bottom));
    transition: background .25s;
}

[data-reference-mode='dark'] .cs-mockup-scene {
    background: linear-gradient(140deg, var(--ref-dark-top), var(--ref-dark-bottom));
}

.cs-mockup-scene::before {
    content: '';
    position: absolute;
    width: 68%;
    aspect-ratio: 1;
    right: -26%;
    top: -38%;
    border-radius: 50%;
    background: var(--ref-glow);
    opacity: .15;
    z-index: -1;
}

.cs-mockup-laptop {
    position: relative;
    width: 87%;
    transform: rotateX(3deg) rotateY(-7deg) rotateZ(-3deg);
    transition: transform .4s;
}

.cs-mockup-display {
    overflow: hidden;
    border: 4px solid #393b40;
    border-radius: 10px 10px 4px 4px;
    background: #fff;
    box-shadow: 0 22px 35px #0003;
}

.cs-mockup-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px;
    background: #f3f4f6;
    color: #5b5e66;
    border-bottom: 1px solid #d9dce1;
    font: 500 8px/1.2 Inter, sans-serif;
}

[data-reference-mode='dark'] .cs-mockup-toolbar {
    background: #252830;
    color: #d0d3dc;
    border-bottom-color: #393c45;
}

.cs-mockup-dots {
    display: flex;
    gap: 4px;
}

.cs-mockup-dots i {
    display: block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
    opacity: .4;
}

.cs-mockup-webpage {
    aspect-ratio: 1.6;
    background: #fff;
    overflow: hidden;
}

.cs-mockup-webpage img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    max-width: none;
    border: 0;
    border-radius: 0;
}

.cs-mockup-keyboard {
    position: relative;
    width: 114%;
    height: 10px;
    margin-left: -7%;
    border-radius: 0 0 50% 50% / 0 0 100% 100%;
    background: linear-gradient(#d9dce1, #a0a4ad);
    box-shadow: 0 14px 15px #0003;
}

.cs-mockup-keyboard span {
    display: block;
    width: 18%;
    height: 3px;
    margin: auto;
    background: #82868e;
    border-radius: 0 0 4px 4px;
}

.cs-mockup-zoom {
    position: absolute;
    top: 16px;
    right: 16px;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 1px solid #ffffff60;
    border-radius: 50%;
    background: #ffffffcf;
    color: #252830;
    font: 22px/1 Inter, sans-serif;
}

.cs-mockup-caption {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 16px;
    background: var(--sc-surface);
}

.cs-mockup-domain {
    font-size: 11px;
    color: var(--sc-muted);
    overflow-wrap: anywhere;
}

.cs-theme-switch {
    display: inline-flex;
    flex: 0 0 auto;
    border: 1px solid var(--sc-line);
    border-radius: 99px;
    padding: 3px;
    background: var(--sc-paper);
}

.cs-page .cs-theme-switch button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 76px;
    min-height: 44px;
    padding: 7px 10px;
    border: 0;
    border-radius: 99px;
    background: transparent;
    color: var(--sc-muted);
    font-size: 11px;
    line-height: 1.2;
}

.cs-page .cs-theme-switch button i {
    font-size: 13px;
    color: inherit !important;
}

.cs-page .cs-theme-switch button[aria-pressed='true'] {
    background: var(--sc-ink);
    color: var(--sc-paper);
}

.cs-page .cs-theme-switch button:focus-visible {
    outline-width: 2px;
    outline-offset: 2px;
}

.cs-mockup-copy {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 20px;
    padding: 20px 3px 0;
}

.cs-page .cs-mockup-copy p {
    margin-bottom: 6px;
    font-size: 11px;
}

.cs-page .cs-mockup-copy h2 {
    font-size: 25px;
    line-height: 1.3;
    letter-spacing: 0;
    font-weight: 600;
}

.cs-mockup-copy h2 span {
    display: none;
}

.cs-page .cs-mockup-study {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 10px;
    min-height: 44px;
    color: var(--sc-ink);
    font-size: 11px;
}

.cs-mockup-study:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.cs-page .cs-mockup-note {
    padding-left: 3px;
    margin-top: 5px;
    font-size: 10px;
}

.cs-preview-dialog {
    width: min(1100px, calc(100vw - 48px));
    max-height: calc(100dvh - 48px);
    margin: auto;
    padding: 0;
    border: 1px solid var(--sc-line);
    border-radius: 24px;
    background: var(--sc-surface);
    color: var(--sc-ink);
    box-shadow: 0 30px 120px #0006;
}

.cs-preview-dialog[open] {
    display: flex;
    flex-direction: column;
}

.cs-preview-heading, .cs-preview-tools, .cs-preview-footer {
    flex-shrink: 0;
}

.cs-preview-stage {
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
}

.cs-preview-dialog::backdrop {
    background: #111318ba;
    backdrop-filter: blur(12px);
}

html:has(.cs-preview-dialog[open]) {
    overflow: hidden;
}

.cs-preview-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 22px 26px 16px;
}

.cs-page .cs-preview-eyebrow {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .12em;
}

.cs-page .cs-preview-heading h2 {
    font-size: 25px;
    margin-top: 5px;
    line-height: 1.2;
    font-weight: 600;
}

.cs-preview-close {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    padding: 0;
    background: var(--sc-paper);
    color: var(--sc-ink);
    border: 1px solid var(--sc-line);
    border-radius: 50%;
    font-size: 25px !important;
}

.cs-preview-tools {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 0 26px 18px;
}

.cs-preview-tools > a {
    font-size: 11px;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.cs-preview-stage .cs-mockup-scene {
    aspect-ratio: auto;
    min-height: 200px;
    padding: 32px;
}

.cs-preview-stage .cs-mockup-laptop {
    width: min(100%, 900px);
    transform: none;
}

.cs-preview-stage .cs-mockup-keyboard {
    display: none;
}

.cs-preview-stage .cs-mockup-toolbar {
    font-size: 10px;
    padding: 10px 12px;
}

.cs-preview-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    padding: 18px 26px;
}

.cs-preview-study {
    font-size: 12px;
}

.cs-page .cs-preview-live {
    display: inline-flex;
    gap: 16px;
    align-items: center;
    min-height: 44px;
    padding: 12px 20px;
    border-radius: 99px;
    background: var(--sc-ink);
    color: var(--sc-paper);
    font-size: 12px;
    font-weight: 600;
}

@media (hover: hover) and (pointer: fine) {
    .cs-mockup-card:hover .cs-mockup-visual, .cs-mockup-card:focus-within .cs-mockup-visual {
        border-color: var(--sc-hover-line, var(--sc-muted));
    }
    .cs-mockup-open:hover .cs-mockup-laptop {
        transform: rotateX(0) rotateY(0) rotateZ(0) translateY(-3px);
    }
}

@media (max-width: 1100px) {
    .cs-mockup-copy {
        align-items: start;
        flex-direction: column;
        gap: 0;
    }
    .cs-portfolio-hero__visual {
        height: 420px;
    }
    .cs-portfolio-hero__window--2 {
        top: 155px;
    }
}

@media (max-width: 760px) {
    .cs-page .cs-portfolio-hero .sc-hero-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 40px;
    }
    .cs-page .cs-portfolio-hero .sc-lead {
        font-size: 15px;
    }
    .cs-portfolio-hero__visual {
        width: 100%;
        max-width: 530px;
        height: 490px;
        margin-inline: auto;
    }
    .cs-portfolio-hero__window--2 {
        top: 170px;
    }
    .cs-mockup-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 34px;
    }
    .cs-mockup-copy {
        align-items: end;
        flex-direction: row;
        gap: 16px;
    }
    .cs-page .cs-mockup-copy h2 {
        font-size: 23px;
    }
    .cs-preview-dialog {
        width: calc(100vw - 20px);
        max-height: calc(100dvh - 20px);
        border-radius: 20px;
    }
    .cs-preview-heading, .cs-preview-footer {
        padding: 16px;
    }
    .cs-preview-tools {
        padding: 0 16px 16px;
    }
    .cs-preview-stage .cs-mockup-scene {
        padding: 18px 12px;
    }
    .cs-page .cs-preview-heading h2 {
        font-size: 21px;
    }
    .cs-preview-stage .cs-mockup-toolbar {
        font-size: 8px;
    }
}

@media (max-width: 480px) {
    .cs-page .cs-portfolio-hero .sc-hero-grid {
        gap: 32px;
    }
    .cs-portfolio-hero__visual {
        height: 360px;
    }
    .cs-portfolio-hero__window--1 {
        top: 12px;
    }
    .cs-portfolio-hero__window--2 {
        top: 135px;
    }
    .cs-page .cs-portfolio-hero .sc-actions {
        align-items: start;
        flex-direction: column;
        gap: 5px;
    }
    .cs-page .cs-portfolio-hero .smpls-button {
        font-size: 13px;
    }
    .cs-mockup-scene {
        aspect-ratio: 1.3;
        padding: 28px 14px;
    }
    .cs-mockup-caption {
        padding: 10px 12px;
    }
    .cs-page .cs-theme-switch button {
        min-width: 70px;
    }
    .cs-mockup-toolbar {
        font-size: 7px;
    }
    .cs-mockup-copy {
        flex-direction: column;
        align-items: start;
        gap: 0;
    }
    .cs-mockup-copy .cs-mockup-study {
        min-height: 36px;
    }
}

@media (max-width: 359px) {
    .cs-mockup-caption {
        align-items: start;
        flex-direction: column;
    }
    .cs-portfolio-hero__visual {
        height: 310px;
    }
    .cs-portfolio-hero__window--2 {
        top: 115px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cs-mockup-visual, .cs-mockup-laptop, .cs-mockup-scene {
        transition: none;
    }
}
