*,
*::before,
*::after {
    box-sizing: border-box;
    color-scheme: light;
}

body,
html {
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
    scroll-padding-top: 8rem;
}

.main {
    max-width: 80ch;
    margin: 0 auto;
    padding: var(--padding-md);
    text-align: justify;
}

.hero {
    background-color: var(--bg-90);
    color: var(--primary-fg);
    text-align: center;
    padding: var(--padding-md);
    padding-bottom: var(--padding-lg);
    display: flex;
    align-items: center;
    align-content: center;
    justify-content: center;
    flex-direction: column;
    flex-wrap: wrap;
}

.hero-img {
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    min-height: calc(100vh / 3);
    position: relative;
}

.hero-img::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, transparent 50%, var(--bg) 100%);
}

.hero-img .hero-title,
.hero-img .hero-subtitle {
    padding: 0.25em;
    backdrop-filter: brightness(0.5) blur(2px);
    border-radius: 0.125em;
}

.hero-title {
    font-size: 3rem;
    margin: 0;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin: 0;
    opacity: var(--muted-transparency);
}

.inline-img {
    height: 1.5em;
    vertical-align: middle;
    margin-right: 0.5ch;
}

::selection {
    background: var(--primary);
}

::-moz-selection {
    background: var(--primary);
}

section:not(:last-of-type) {
    margin-bottom: 4em;
}

.project-card {
    transition: all 0.2s ease-in-out;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    margin: 0;
}

.project-card p {
    text-align: left !important;
}

.project-card:hover,
.project-card:focus,
.project-card:focus-visible {
    transform: scale(1.02);
    border-color: var(--primary);
}

.project-card .card-header {
    margin-bottom: 0.25em;
}

.project-ref {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
}

.project-name,
.project-version {
    margin: 0;
    font-size: 1.2em;
}

.project-version {
    font-size: 0.8em;
    font-family: "Noto Sans Mono", monospace;
    font-variant: slashed-zero;
}

.project-title {
    margin: 0;
    font-size: 0.75em;
}

.project-description {
    margin: 0.5em 0 0 0;
    font-size: 0.9em;
}

.project-card .card-footer {
    margin-top: 0.25em;
    padding-top: 0.25em;
    font-size: 0.75em;
    display: flex;
    justify-content: start;
    align-items: center;
    gap: 1ch;
}

.stage-wrapper {
    text-align: left;
}

.stage-code {
    font-weight: bold;
}

.stage-title {
    display: none;
    padding-left: 1ch;
}

.stage-wrapper:focus .stage-title,
.stage-wrapper:focus-visible .stage-title,
.stage-wrapper:hover .stage-title {
    display: inline;
}

.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1em;
    align-items: stretch;
    min-height: 20em;
}