.portfolio-cover.container {
    width: min(1420px, 92%);
    padding-block: clamp(48px, 5.6vw, 88px) clamp(32px, 4vw, 64px);
}

.cover-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.82fr) minmax(0, 1fr);
    align-items: start;
    gap: clamp(30px, 3.4vw, 56px);
    --paper-edge: polygon(0.6% 1%, 8% 0.4%, 18% 1%, 26% 0.3%, 37% 0.7%, 48% 0,
        57% 0.6%, 68% 0.2%, 82% 0.8%, 90% 0.2%, 99.5% 0.6%, 100% 13%, 99.6% 26%,
        100% 41%, 99.6% 58%, 100% 76%, 99.6% 100%, .4% 100%, 0 82%,
        .5% 65%, 0 48%, .4% 32%, 0 13%);
    --torn-bottom: linear-gradient(#000, #000) top / 100% calc(100% - 7px) no-repeat,
        url("/assets/img/notebook-paper-edge-20261125-1.webp") bottom / 256px 8px repeat-x;
}

.cover-feature {
    overflow: visible;
    background: none;
    color: var(--notebook-ink);
}

.cover-feature::after {
    content: none;
}

.notebook-print {
    position: relative;
    margin: 0;
    transform: rotate(-1.6deg);
}

.print-frame {
    display: block;
    filter: drop-shadow(0 3px 1.5px rgb(35 25 43 / 19%));
}

.print-mount {
    display: block;
    position: relative;
    padding: clamp(6px, .8vw, 12px);
    background: #fffcf1 var(--notebook-grain) repeat;
    clip-path: var(--paper-edge);
    mask: var(--torn-bottom);
}

.print-mount::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: var(--notebook-grain);
    mix-blend-mode: multiply;
    opacity: .42;
}

.print-mount img {
    width: 100%;
    height: auto;
    aspect-ratio: 1.63;
    object-fit: cover;
    object-position: 50% 50%;
    clip-path: var(--paper-edge);
}

.notebook-print::before,
.cover-app::after {
    content: "";
    position: absolute;
    z-index: 1;
    top: 0;
    left: 51%;
    width: clamp(78px, 10vw, 155px);
    height: clamp(21px, 2.9vw, 44px);
    pointer-events: none;
    background: #f4cd68 var(--notebook-grain) repeat;
    opacity: .94;
    transform: translate(-50%, -57%) rotate(-4deg);
    clip-path: polygon(0 5%, 100% 0, 99% 19%, 100% 37%, 98.7% 50%, 100% 71%,
        99% 88%, 100% 97%, 0 100%, 1.3% 81%, 0 69%, 1% 50%, 0 35%, 1.5% 17%);
}

.print-caption {
    position: relative;
    margin: clamp(24px, 2.5vw, 42px) 1% 0 4%;
    padding-right: 20%;
}

.print-caption::after {
    content: "";
    position: absolute;
    inset: 7% 3% 0 auto;
    width: 22%;
    pointer-events: none;
    background: center / contain no-repeat url("/assets/img/notebook-ram-20261125-1.webp");
}

.print-caption h2,
.cover-app h2 {
    display: table;
    position: relative;
    color: var(--notebook-ink);
    font-family: var(--serif);
    font-weight: 600;
    line-height: 1.06;
    letter-spacing: -.055em;
}

.print-caption h2 {
    font-size: clamp(2.6rem, 6vw, 5.85rem);
    transform: rotate(.5deg);
}

.print-caption h2::after,
.cover-app h2::after {
    content: "";
    display: block;
    height: clamp(5px, .75vw, 11px);
    margin-top: 3px;
    background: center / 100% 100% no-repeat url("/assets/img/notebook-underline-20261125-1.webp");
}

.print-caption h2 a {
    color: inherit;
    text-decoration: none;
}

.print-caption .hero-steam-link {
    margin-top: 7px;
    color: var(--notebook-ink);
    font-size: clamp(1rem, 1.5vw, 1.4rem);
    text-underline-offset: .22em;
}

.cover-app {
    position: relative;
    isolation: isolate;
    min-width: 0;
    margin-top: clamp(22px, 3.8vw, 64px);
    padding: clamp(24px, 2.6vw, 42px) clamp(18px, 2.1vw, 34px);
    color: var(--notebook-ink);
    text-align: center;
}

.cover-app::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    pointer-events: none;
    background: #fdedc2 var(--notebook-grain) repeat;
    clip-path: var(--paper-edge);
    mask: var(--torn-bottom);
    transform: rotate(1.9deg);
}

.cover-app::after {
    left: 61%;
    width: clamp(66px, 7vw, 110px);
    background-color: #85a4d0;
    transform: translate(-50%, -50%) rotate(9deg);
}

.cover-app-art {
    display: block;
    width: 88%;
    max-height: clamp(150px, 18vw, 280px);
    height: auto;
    margin: 0 auto clamp(10px, 1.2vw, 19px);
    object-fit: contain;
}

.cover-app h2 {
    margin: 0 auto;
    font-size: clamp(2.35rem, 4.65vw, 4.65rem);
}

.cover-app .cover-platform {
    margin: clamp(11px, 1.15vw, 18px) 0;
    font-size: clamp(.95rem, 1.4vw, 1.3rem);
    line-height: 1.4;
    letter-spacing: 0;
}

.cover-app .app-actions {
    justify-content: center;
    gap: 8px clamp(8px, 1vw, 16px);
    margin: 0;
}

.cover-app .btn {
    flex: 1 1 0;
    max-width: 11.5rem;
    padding: .75em .5em;
    border-radius: 6px 5px 7px 4px;
    font-size: clamp(.94rem, 1.4vw, 1.35rem);
    line-height: 1.3;
    white-space: nowrap;
}

.cover-app .notebook-links {
    margin-top: 8px;
}

.cover-app .text-link {
    color: var(--notebook-ink);
    font-size: .875rem;
}

.app-description {
    max-width: 38ch;
    margin: 12px auto 0;
    font-size: 1rem;
    line-height: 1.45;
}

.portfolio-cover + .projects-section {
    padding-top: clamp(30px, 4vw, 68px);
}

@media (max-width: 720px) {
    .portfolio-cover.container {
        width: calc(100% - 40px);
        padding-top: 37px;
    }

    .cover-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 34px;
    }

    .print-caption {
        margin-top: 18px;
        padding-right: 15%;
    }

    .print-caption h2 {
        font-size: clamp(2.1rem, 10.7vw, 3.5rem);
    }

    .print-caption::after {
        right: 0;
        width: 15%;
    }

    .cover-app {
        width: min(100%, 470px);
        margin: 0 auto;
        padding-block: 23px 12px;
    }

    .cover-app-art {
        width: 62%;
        max-height: 145px;
    }
}
