main {
    box-sizing: border-box;
    display: grid;
    align-items: center;
    grid-template-columns: minmax(220px, 0.8fr) minmax(540px, 1fr);
    gap: clamp(32px, 6vw, 96px);
    width: 100%;
    min-height: 100vh;
    padding: clamp(20px, 5vw, 80px);
}

.work-display {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 300px));
    gap: clamp(14px, 2vw, 28px);
    width: min(100%, 628px);
    justify-self: end;
}

.work-card {
    position: relative;
    box-sizing: border-box;
    isolation: isolate;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 10px;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    padding: clamp(30px, 4vw, 44px);
    border: 0;
    border-radius: 50%;
    font-family: "Inter Display", "Inter", sans-serif;
    background: #000;
    color: white;
    text-align: center;
    transition: background-color 0.28s ease;
}

.work-card:hover {
    background: #111;
}

.work-card > a {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: max-content;
    min-height: 34px;
    margin-top: 8px;
    padding: 6px 12px;
    border: 1px solid #ffffff36;
    border-radius: 999px;
    background: #ffffff10;
    color: currentColor;
    font-size: 14px;
    line-height: 1;
    text-decoration: none;
    transition:
        background-color 0.3s ease,
        border-color 0.3s ease,
        color 0.3s ease;
}

.work-card > a:hover {
    border-color: #fff;
    background: #fff;
    color: #000;
}

.work-card > a span {
    font-size: 13px;
    line-height: 1;
}

.work-type,
.work-summary,
.work-card h3 {
    position: relative;
    z-index: 1;
    margin: 0;
}

.work-type {
    transform: scaleX(0.82);
    transform-origin: center center;
    color: currentColor;
    opacity: 0.64;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    text-transform: uppercase;
}

.work-summary {
    max-width: 180px;
    opacity: 0.76;
    font-size: clamp(14px, 1.4vw, 16px);
    line-height: 1.25;
}

.work-card:hover .work-type,
.work-card:hover .work-summary {
    opacity: 0.82;
}

.work-card:focus-within {
    outline: 2px solid #000;
    outline-offset: 6px;
}

.work-card:hover > a {
    border-color: #ffffff52;
}

.work-card h3 {
    font-family: "Inter Display", "Inter", sans-serif;
    font-size: clamp(28px, 2.6vw, 38px);
    font-weight: 500;
    line-height: 0.92;
    letter-spacing: 0;
}

.work-header {
    display: flex;
    flex-direction: column;
    align-items: start;
    gap: 24px;
}

@media (max-width: 1080px) {
    body {
        box-sizing: border-box;
        padding-top: 40px;
        min-height: 100vh;
    }

    main {
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        gap: 36px;
        min-height: 100vh;
        padding-bottom: 96px;
    }

    .work-header {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 18px;
    }

    .work-header > h1 {
        width: fit-content;
        transform: scaleX(0.78);
        transform-origin: center center;
        text-align: center;
    }

    .work-display {
        grid-template-columns: repeat(2, minmax(150px, 1fr));
        width: min(100%, 720px);
        justify-self: center;
    }

    .work-card {
        padding: clamp(18px, 5vw, 32px);
    }

    .work-summary {
        max-width: 160px;
        font-size: 14px;
    }

    #backBtn {
        position: static;
        margin-top: 0;
        translate: none;
        z-index: 9;
    }
}

@media (max-width: 620px) {
    body {
        padding-top: 24px;
    }

    main {
        gap: 26px;
        padding-inline: 16px;
    }

    .work-display {
        grid-template-columns: 1fr;
        width: min(100%, 340px);
    }

    .work-card {
        aspect-ratio: 1 / 1;
        border-radius: 50%;
    }

    .work-summary {
        max-width: 230px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .work-card,
    .work-card > a {
        transition: none;
    }
}
