/* Lovable design, adapted to the static showcase. Scoped to the overview page. */
.showcase-page {
    --color-bg: oklch(0.974 0.010 82);
    --color-text: oklch(0.276 0.023 249);
    --color-accent: oklch(0.561 0.135 42);
    --color-muted: oklch(0.52 0.02 70);
    --color-frame: oklch(1 0 0);
    --color-border: oklch(0.909 0.021 82);
    --color-surface: oklch(0.948 0.016 83);
    --shadow-frame: 0 1px 2px oklch(0.276 0.023 249 / 0.05),
        0 8px 20px oklch(0.276 0.023 249 / 0.05);
    --font-display: "Fraunces", Georgia, serif;
    --font-body: "Instrument Sans", system-ui, sans-serif;
    display: flex;
    flex-direction: column;
    max-width: none;
    min-height: 100vh;
    min-height: 100svh;
    margin: 0;
    padding: 0 16px 16px;
    font: 400 14px/1.5 var(--font-body);
}

.showcase-page *,
.showcase-page *::before,
.showcase-page *::after {
    box-sizing: border-box;
}

.showcase-page h1,
.showcase-page h2,
.showcase-page p {
    margin: 0;
}

.showcase-page a {
    color: inherit;
    text-decoration: none;
}

.showcase-page a:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 3px;
}

.showcase-page .skip-link {
    position: fixed;
    z-index: 1;
    top: 8px;
    left: 16px;
    padding: 8px 12px;
    color: var(--color-text);
    background: var(--color-bg);
    transform: translateY(-160%);
}

.showcase-page .skip-link:focus {
    transform: translateY(0);
}

.showcase-header {
    display: flex;
    flex: none;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px 24px;
    padding: 16px 0;
}

.showcase-intro h1 {
    font: 400 24px/1.25 var(--font-display);
}

.showcase-intro p {
    max-width: 36rem;
    margin-top: 4px;
    color: var(--color-muted);
}

.showcase-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
}

.showcase-nav a:hover,
.showcase-nav a:focus-visible {
    color: var(--color-accent);
    text-decoration: underline;
    text-underline-offset: 4px;
}

.intro-keywords {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.keyword-divider {
    opacity: 0.55;
}

.showcase-page .cv-link {
    color: var(--color-text);
    text-decoration: underline;
    text-underline-offset: 3px;
    white-space: nowrap;
}

.showcase-page .cv-link:hover {
    color: var(--color-accent);
}

.showcase-main {
    margin: 0;
}

.showcase-work {
    display: grid;
    flex: 1;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    min-height: 0;
    margin: 0;
}

.work-feature {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
}

.work-media {
    position: relative;
    display: block;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    border: 1px solid var(--color-border);
    background: var(--color-frame);
    box-shadow: var(--shadow-frame);
}

/* Absolute images let each frame follow the layout instead of intrinsic image sizes. */
.work-media img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.software-media {
    aspect-ratio: 1190 / 730;
}

.software-media img,
.research-media img {
    object-fit: contain;
}

.teaching-media {
    aspect-ratio: 16 / 9;
}

.research-media {
    aspect-ratio: 2671 / 1675;
}

.design-media {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    min-height: 0;
    aspect-ratio: 4 / 3;
}

.poster-media img {
    object-position: top center;
}

.work-caption {
    flex: none;
    padding-top: 8px;
}

.software-feature .work-caption {
    padding-top: 12px;
}

.section-label {
    display: block;
    margin-top: 4px;
    color: var(--color-accent);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.software-feature p {
    margin-top: 4px;
    color: var(--color-muted);
}

.teaching-feature h2 {
    font: 400 20px/1.25 var(--font-display);
}

.supporting-work {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    min-height: 0;
    border-top: 1px solid var(--color-border);
    padding-top: 12px;
}

.supporting-work h2 {
    font-size: 15px;
    font-weight: 500;
    line-height: 1.375;
}

.software-feature h2,
.automation-feature h2 {
    font: 400 24px/1.25 var(--font-display);
}

.work-feature:hover h2,
.work-feature:focus-visible h2 {
    color: var(--color-accent);
}

.additional-work {
    margin-top: 24px;
}

.additional-work .work-media {
    aspect-ratio: 16 / 10;
}

.art-media {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
}

.art-image {
    position: relative;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}

.art-media img {
    object-fit: cover;
}

.automation-media img {
    object-fit: contain;
}

.creative-feature {
    margin-top: 32px;
    border-top: 1px solid var(--color-border);
    padding-top: 24px;
}

.creative-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    align-items: end;
    margin-bottom: 20px;
}

.creative-heading .section-label {
    margin: 0 0 8px;
}

.creative-heading h2 {
    font: 400 clamp(26px, 3vw, 38px)/1.2 var(--font-display);
}

.creative-heading p {
    max-width: 54ch;
    color: var(--color-muted);
    font-size: 15px;
    line-height: 1.6;
}

.creative-media {
    margin: 0;
    aspect-ratio: 16 / 9;
}

.creative-media video {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    background: var(--color-frame);
}

.creative-media video:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: -3px;
}

.showcase-page .creative-note {
    max-width: 90ch;
    margin-top: 10px;
    color: var(--color-muted);
    font-size: 12px;
    line-height: 1.6;
}

@media (min-width: 768px) {
    .showcase-page {
        --showcase-header-height: 96px;
        padding: 0 24px 24px;
    }

    .showcase-header {
        flex-wrap: nowrap;
        height: var(--showcase-header-height);
    }

    .showcase-intro h1 {
        font-size: 30px;
    }

    .showcase-nav {
        flex-shrink: 0;
    }

    .showcase-work {
        grid-template-columns: minmax(0, 11fr) minmax(0, 9fr);
        grid-template-rows: minmax(0, 58fr) minmax(0, 42fr);
        /* Leave about 75px of the next row's previews visible below the first four demos. */
        height: max(420px, calc(100vh - var(--showcase-header-height) - 112px));
        height: max(420px, calc(100svh - var(--showcase-header-height) - 112px));
    }

    .software-feature {
        grid-row: span 2;
        border-right: 1px solid var(--color-border);
        padding-right: 16px;
    }

    .work-feature > .work-media,
    .design-media {
        flex: 1;
        aspect-ratio: auto;
    }

    .software-feature h2,
    .automation-feature h2 {
        font-size: 28px;
    }

    .additional-work .work-media {
        flex: none;
        height: clamp(220px, 38vh, 380px);
        height: clamp(220px, 38svh, 380px);
        aspect-ratio: auto;
    }

    .creative-heading {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 32px;
    }
}

@media (min-width: 1280px) {
    .software-feature h2,
    .automation-feature h2 {
        font-size: 32px;
    }

    .teaching-feature h2 {
        font-size: 24px;
    }
}

/* Keep section navigation compact on smaller laptops. */
@media (min-width: 768px) and (max-width: 1279px) {
    .showcase-nav {
        gap: 8px 14px;
        font-size: 13px;
    }

}

@media (min-width: 768px) and (max-height: 680px) {
    .showcase-page {
        --showcase-header-height: 80px;
    }

    .showcase-header {
        padding-block: 8px;
    }

    .software-feature p {
        display: none;
    }
}

@media (max-width: 399px) {
    .supporting-work {
        grid-template-columns: minmax(0, 1fr);
    }
}
