/*
Global
*/

body {
    font-family: 'Archivo', sans-serif;
    color: var(--content);
    background: radial-gradient(120% 90% at 50% 32%, #15151f 0%, var(--bg) 58%, #08080d 100%);
}

#rotate-message {
    display: none;
    position: fixed;
    inset: 0;
    align-items: center;
    justify-content: center;
    font-family: inherit;
    color: var(--content);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-size: 16px;
    background: radial-gradient(120% 90% at 50% 32%, #15151f 0%, var(--bg) 58%, #08080d 100%);
}

#app {
    position: relative;
    width: 100%;
    min-height: 100dvh;
}

/*
Main wrapper
*/

/* Section visibility */
.view {
    position: absolute;
    inset: 0;
    overflow-y: auto;
    visibility: hidden;
    opacity: 0;
    overscroll-behavior: none;
    scroll-snap-type: y mandatory;
    scroll-padding-top: 65px;
    transition:
        opacity 0.5s,
        visibility 0s 0.5s;
}

.view:focus {
    outline: none;
}

.view.is-active {
    visibility: visible;
    opacity: 1;
    transition: opacity 0.5s;
}

/*
Character select screen
*/

#character-select {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    gap: clamp(24px, 4.5vh, 84px);
    padding: 2px 24px;
}

/* Top label */
.character-select-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.character-select-header p {
    font-weight: 500;
    font-size: 11px;
    letter-spacing: 0.58em;
    text-indent: 0.58em;
    text-transform: uppercase;
    color: color-mix(in srgb, var(--content) 46%, transparent);
}

/* Makes the h1 invisible to the layout engine: the h1 contributes to the semantics
but doesn't affect the layout */
.character-select-header h1 {
        display: contents;
    }

.character-select-header img {
    width: 160px;
    height: auto;
    -weblit-mask-image: linear-gradient(to right, rgba(255, 255, 255, 0.74), rgba(255, 255, 255, 0.6));
    mask-image: linear-gradient(to right, rgba(255, 255, 255, 0.74), rgba(255, 255, 255, 0.6));
}

/* Card wrapper */
.card-wrapper {
    display: flex;
    gap: clamp(24px, 4vw, 64px);
    align-items: stretch;
    scroll-behavior: smooth;
}

/* Cards */

/* —————————————————————————————————————————— */
.card-outer:first-child {
    --accent: var(--accent-amber);
}

.card-outer:last-child {
    --accent: var(--accent-blue);
}
/* —————————————————————————————————————————— */

/* Optical correction for big C initial */
.card-outer:last-child .card-hero p {
    margin-right: 8px;
}

.card-outer {
    container-type: size;
    container-name: card;
    position: relative;
    width: clamp(300px, 26vw, 384px);
    aspect-ratio: 5/7.6;
    border: 1px solid color-mix(in srgb, var(--content) 16%, transparent);
    background:
        radial-gradient(135% 100% at 50% 0%, color-mix(in srgb, var(--accent) 9%, transparent) 0%, transparent 52%),
        linear-gradient(180deg, #101019 0%, #0c0c12 100%);
    transition:
        transform 0.5s var(--transition-curve),
        border-color 0.5s,
        box-shadow 0.5s,
        opacity 0.5s;
}

.card-inner {
    position: absolute;
    inset: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    justify-content: center;
    gap: 7cqw;
    border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
    padding:
        10.2cqw
        8cqw
        9.5cqw;
    transition: border-color 0.5s;
}

/*
.card-inner > * {
    outline: 0.5px solid white;
}
*/

/*
.card-hero > * {
    outline: 0.6px solid aqua;
}
*/

/* Card text elements*/


.card-hero {
    display: flex;
    flex-direction: column;
    gap: 3cqw; /* between numeral and initial */
}

.card-numeral {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 400;
    font-size: 5.3cqw;
    font-style: italic;
    letter-spacing: 0.18em;
    text-indent: 0.18em;
    line-height: 1;
    color: color-mix(in srgb, var(--content) 42%, transparent);
}

.card-initial {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: 64.5cqw;
    letter-spacing: 0.01em;
    text-indent: 0.01em;
    line-height: 0.8;
    color: var(--accent);
    transition: text-shadow 0.5s ease;
}

.card-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5.4cqw;
    /**/
    margin-top: auto;
    /**/
}

.card-text hr {
    width: 11.5cqw;
    border: none;
    border-top: 1px solid color-mix(in srgb, var(--accent) 55%, transparent);
    transition: width 0.5s var(--transition-curve);
}

.card-name {
    display: block;
    font-family: 'Cormorant Garamond', sans-serif;
    font-size: 8.5cqw;
    line-height: 1.6;
    letter-spacing: 0.13em;
    text-indent: 0.13em;
    text-transform: uppercase;
}

.card-name span {
    display: block;
}

.card-name span:first-child {
    font-weight: 400;
}

.card-name span:last-child {
    font-weight: 500;
}

.card-tagline {
    max-width: 24ch;
    font-family: 'Archivo', sans-serif;
    font-size: clamp(9.5px, 2.8cqw, 11px);
    line-height: 1.7;
    letter-spacing: 0.26em;
    text-indent: 0.26em;
    text-transform: uppercase;
    color: color-mix(in srgb, var(--content) 58%, transparent);
}

/* Hover state */
.card-outer:hover {
    transform: translateY(-8px);
    border-color: color-mix(in srgb, var(--accent) 55%, transparent);
    box-shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.8), 0 0 0 1px color-mix(in srgb, var(--accent) 18%, transparent);
    cursor: pointer;
}

.card-outer:hover .card-inner {
    border-color: color-mix(in srgb, var(--accent) 60%, transparent);
}

.card-outer:hover hr {
    width: 19.5cqw;
    transition: width 0.5s var(--transition-curve);
}

.card-outer:hover .card-hero p {
    text-shadow: 0 0 46px color-mix(in srgb, var(--accent) 50%, transparent);
}

/*Dim unselected sibling card*/
.card-wrapper:has(.card-outer:hover) .card-outer:not(:hover) {
    opacity: 0.4;
}

.card-wrapper:has(.card-selected) .card-outer:not(.card-selected) {
    opacity: 0.4;
}

/* Selected state */
.card-selected,
.card-selected:hover {
    transform: translateY(-8px);
    border-color: var(--accent);
    box-shadow: 0 36px 80px -32px rgba(0, 0, 0, 0.85), 0 0 0 1px color-mix(in srgb, var(--accent) 40%, transparent), 0 0 60px -10px color-mix(in srgb, var(--accent) 30%, transparent);
}

.card-selected .card-hero p,
.card-selected:hover .card-hero p {
    text-shadow: 0 0 52px color-mix(in srgb, var(--accent) 90%, transparent);
}

.card-selected .card-inner,
.card-selected:hover .card-inner {
    border-color: color-mix(in srgb, var(--accent) 80%, transparent);
}

.card-selected hr,
.card-selected:hover hr {
    width: 19cqw;
}

/* Character select footer */
.character-select-footer {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.character-select-footer {
    font-weight: 500;
    font-size: 12px;
    letter-spacing: 0.5em;
    text-indent: 0.5em;
    text-transform: uppercase;
    color: color-mix(in srgb, var(--content) 46%, transparent);
}

/* Targets the first <p> in the footer to give it a gradient only when it's the direct
first child of .character-select-footer */
.character-select-footer > p:first-child {
    background: linear-gradient(to right, var(--accent-amber), var(--accent-blue));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.footer-link {
    display: flex;
    justify-content: center;
    align-items: center;
}

.character-select-footer .footer-link {
    text-transform: none;
    letter-spacing: 0.3em;
    text-indent: 0.3em;
}

.footer-link a {
    text-transform: uppercase;
    color: color-mix(in srgb, var(--content) 62%, transparent);
    transition: text-shadow 0.25s ease;
}

.footer-link a:hover {
    text-shadow: 0 0 10px color-mix(in srgb, var(--content) 64%, transparent);
}

/* Targets footer in portfolio views, doesn't apply to character-select footer */
footer .footer-link {
    gap: 0.15em;
}

footer .footer-link a {
    letter-spacing: 0.12em;
    text-indent: 0.12em;
}
/* ————————————————————————————————————————————————————— */

/*
Portfolio sections
*/

/* Define color accent with container scope */
#portfolio-davide {
    --accent: var(--accent-amber);
}

#portfolio-cesare {
    --accent: var(--accent-blue);
}

/* ————————————————————————————————————————————————————— */

.portfolio-header {
    position: sticky;
    top: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background-color: var(--bg);
    z-index: 10;
}

.portfolio-header img {
    width: 190px;
    height: auto;
    cursor: pointer;
    margin-top: 6px;
    margin-left: 6px;
    opacity: 0.66;
    transition:
        opacity 0.25s ease;
}

.portfolio-header img:hover {
    opacity: 0.92;
}

.portfolio-header button {
    background: none;
    background-color: var(--bg);
    border: none;
    font-family: inherit;
    font-size: 11px;
    letter-spacing: 0.5em;
    text-indent: 0.5em;
    text-transform: uppercase;
    padding: 11px 5px;
    cursor: pointer;
    color: color-mix(in srgb, var(--content) 62%, transparent);
    transition: all 0.25s ease;
}

.portfolio-header button:hover {
    color: color-mix(in srgb, var(--content) 78%, transparent);
    text-shadow: 0 0 10px color-mix(in srgb, var(--content) 74%, transparent);
}

.portfolio-header::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 48px;
    background: linear-gradient(
        to bottom,
        color-mix(in srgb, var(--bg) 100%, transparent) 0%,
        color-mix(in srgb, var(--bg) 80%, transparent) 25%,
        color-mix(in srgb, var(--bg) 50%, transparent) 50%,
        color-mix(in srgb, var(--bg) 20%, transparent) 72%,
        color-mix(in srgb, var(--bg) 5%, transparent) 88%,
        color-mix(in srgb, var(--bg) 0%, transparent) 100%
    );
    pointer-events: none;
}

/* Portfolio entries */
.portfolio-entries {
    max-width: 1250px;
    margin: 0 auto;
    padding: 20px;
    
}

.portfolio-entry-row {
    display: flex;
    align-items: flex-start;
    min-height: clamp(400px, 62dvh, 490px);
    gap: 32px;
    padding-top: clamp(60px, 11.5dvh, 90px);
    scroll-snap-align: start;
    opacity: 0.2;
    transition: opacity 0.4s ease;
}

.portfolio-entry-row-squares {
    display: flex;
    flex-direction: column;
    min-height: clamp(400px, 62dvh, 490px);
    gap: 6.5dvh;
    padding-top: clamp(60px, 7.5dvh, 90px);
    align-items: center;
    justify-content: center;
    scroll-snap-align: start;
    opacity: 0.2;
    transition: opacity 0.4s ease;
}

/* Shows the row currently in view */
.portfolio-entry-row.is-visible,
.portfolio-entry-row-squares.is-visible,
.tools-strip-desktop.is-visible,
.tools-strip-mobile.is-visible {
    opacity: 1;
}

.portfolio-entry-row-squares h3 {
    font-size: 28px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: color-mix(in srgb, var(--content) 78%, transparent);
}

.entry-video-wrapper,
.entry-img-wrapper {
    flex: 0 0 64%;
    aspect-ratio: 16/9;
}

.entry-square-img-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 10vw;
}
/*
.entry-square-img-wrapper img {
    width: 30vw;
    height: auto;
}
*/
.square-img-link {
    position: relative;
    display: block;
    width: 30vw;
}

.square-img-link img {
    display: block;
    width: 100%;
    height: auto;
}

.square-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: color-mix(in srgb, var(--bg) 80%, transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    text-align: center;
    color: var(--content);
    padding: 42px;
}

.square-overlay-description {
    line-height: 1.5;
    letter-spacing: 0.09em;
}

.square-img {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4dvh;
}

.img-square-text {
    font-size: 18px;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: color-mix(in srgb, var(--content) 70%, transparent);
}

.entry-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background-color: rgba(0, 0, 0, 0.7);
}

.entry-video-wrapper iframe {
    width: 100%;
    height: 100%;
}

.entry-title-links-wrapper {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.entry-links {
    display: flex;
    align-items: center;
    width: fit-content;
    gap: 20px;
    height: 28px;
}

.entry-links a {
    opacity: 0.7;
    transition: all 0.2s ease;
}

.entry-links a:hover {
    opacity: 1;
}

.entry-links a,
.entry-links img {
    height: 100%;
    width: auto;
}

.itchio-logo-mobile,
.soundcloud-logo-mobile {
    display: none;
}

.entry-text-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    text-transform: uppercase;
    gap: 48px;
}

.entry-text-wrapper h3 {
    font-size: 28px;
    letter-spacing: 0.08em;
    line-height: 1.2;
    color: color-mix(in srgb, var(--content) 92%, transparent);
    margin-bottom: 30px;
}

.entry-text-wrapper h3:has(+ h4),
.entry-text-wrapper h3:has(+ .entry-links) {
    margin-bottom: 0;
}

/* Addresses long <h3> titles that wrap to 2 lines */
.entry-text-wrapper h3.entry-title-long {
    font-size: 26px;
    letter-spacing: 0.04em;
}

.entry-text-wrapper h4 {
    font-size: 20px;
    letter-spacing: 0.09em;
    color: color-mix(in srgb, var(--content) 70%, transparent);
    margin-top: -36px;
    margin-bottom: 12px;
}

.entry-text-wrapper h5 {
    font-size: 18px;
    letter-spacing: 0.09em;
    color: color-mix(in srgb, var(--content) 70%, transparent);
}

.entry-text-wrapper a {
    width: fit-content;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: color-mix(in srgb, var(--content) 78%, transparent);
    transition: all 0.25s ease;
}

.entry-text-wrapper a:hover {
    color: color-mix(in srgb, var(--content) 86%, transparent);
    text-shadow: 0 0 12px color-mix(in srgb, var(--content) 40%, transparent);
}

.entry-text-date, 
.entry-text-role {
    font-size: 15px;
    letter-spacing: 0.16em;
    line-height: 1.6;
    color: color-mix(in srgb, var(--accent) 80%, transparent);
}

.entry-text-description {
    max-width: 50ch;
    font-size: 13px;
    font-weight: 300;
    line-height: 2;
    letter-spacing: 0.12em;
    text-transform: none;
    color: color-mix(in srgb, var(--content) 70%, transparent);
}

.portfolio-entry-row:nth-child(even) {
    flex-direction: row-reverse;
}

/* Mail CTA */
.CTA-email {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 18px;
    width: fit-content;
    margin: 20dvh auto 18dvh;
    /* top and bottom margin slightly different for optical adjustment */
    opacity: 0.8;
    transition: all 0.3s ease;
}

.CTA-email p:first-child {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 32px;
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: color-mix(in srgb, var(--accent) 70%, transparent);
    transition: all 0.3s ease;
}

.CTA-email p:first-child svg {
    fill: var(--accent);
    width: 24px;
    height: auto;
}

.CTA-email p:last-child {
    font-size: 20px;
    font-weight: 300;
    letter-spacing: 0.2em;
    color: color-mix(in srgb, var(--content) 68%, transparent);
    transition: all 0.3s ease;
}

.CTA-email:hover {
    opacity: 1;
}

.CTA-email:hover p {
    text-shadow: 0 0 14px color-mix(in srgb, var(--accent) 26%, transparent);
}

/* Google Drive CTA */
.CTA-drive {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 18px;
    width: fit-content;
    margin: 20dvh auto 2dvh;
    /* top and bottom margin slightly different for optical adjustment */
    opacity: 0.8;
    transition: all 0.3s ease;
}

/* Overrides CTA-email big margin-top when it's preceded by CTA-drive */
.portfolio-entries:has(.CTA-drive) .CTA-email {
    margin-top: 8dvh;
}

.CTA-drive p {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 32px;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: color-mix(in srgb, var(--content) 70%, transparent);
    transition: all 0.3s ease;
}

.CTA-drive p svg {
    width: 24px;
    height: auto;
    opacity: 0.8;
}

.CTA-drive:hover {
    opacity: 1;
}

.CTA-drive:hover p {
    text-shadow: 0 0 14px color-mix(in srgb, var(--accent) 26%, transparent);
}

/* Tools strip */
.tools-strip-desktop {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    align-items: center;
    justify-items: center;
    /*margin-top: 12dvh;*/ 
    opacity: 0.2;
    transition: opacity 0.4s ease;
}

#portfolio-cesare .tools-strip-desktop,
#portfolio-cesare .tools-strip-mobile {
    grid-template-columns: repeat(3, 1fr);
}

.tools-strip-desktop img {
    max-height: 50px;
    width: auto;
    opacity: 0.37;
}

.tools-strip-mobile {
    display: none;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
    align-items: center;
    justify-items: center;
    margin-top: 10dvh;
    opacity: 0.2;
    transition: opacity 0.4s ease;
}

.tools-strip-mobile img {
    max-width: 10vw;
    height: auto;
    opacity: 0.3;
    }

.wwise-logo {
    filter: invert(1) grayscale(1) brightness(2);
    margin-bottom: 5px;
}

.fmod-logo {
    filter: invert(1) grayscale(1) brightness(2);
    height: 30px;
}

.unreal-logo-desktop {
    height: 40px;
    filter: invert(1) grayscale(1) brightness(2);
}

.unity-logo-desktop,
.unreal-logo-mobile,
.ableton-logo-mobile,
.pro-tools-logo {
    filter: invert(1) grayscale(1) brightness(2);
}

.unity-logo-mobile {
    width: 6vw;
    filter: invert(1) grayscale(1) brightness(2);
}

.fl-logo-desktop,
.fl-logo-mobile,
.max-logo {
    filter: grayscale(1) brightness(2);
}

.fl-logo-mobile,
.ableton-logo-mobile,
.tools-strip-mobile .pro-tools-logo,
.tools-strip-mobile .max-logo {
    width: 8vw;
}

.ableton-logo-desktop {
    height: 24px;
    filter: invert(1) grayscale(1) brightness(2);
}

.cycling-max-wrapper {
    display: flex;
    align-items: center;
    gap: 4px;
}

.cycling-logo {
    height: 22px;
}

.tools-strip-mobile .cycling-logo {
    display: none;
}

/* Portfolio entries footer */
footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    gap: 8px;
    scroll-snap-align: end;
    margin-top: 12dvh;
    font-size: 16px;
}

/*
`.footer-link` and `.footer-link a` styled under #character-select 
*/

footer p {
    letter-spacing: 0.08em;
    padding: 2px 0;
    color: color-mix(in srgb, var(--content) 45%, transparent);
}

/*
Media queries
*/

@media (max-width:1000px) {
    .portfolio-entry-row {
        flex-direction: column;
        align-items: stretch;
    }

    .portfolio-entry-row:nth-child(even) {
        flex-direction: column;
    }

    .entry-video-wrapper,
    .entry-img-wrapper {
        flex: none;
    }
}

@media (max-width: 670px) {
    .card-wrapper {
        overflow-x: scroll;
        scroll-snap-type: x mandatory;
        width: 100%;
    }
    .card-outer {
        height: 75dvh;
        width: auto;
        aspect-ratio: 5/7.6;
        scroll-snap-align: center;
        flex-shrink: 0;
    }
}

/* iPhone 8 and similar */
@media (max-width: 480px) {

    #app {
        min-height: 100dvh;
    }

    #character-select {
        min-height: 100dvh;
        gap: 14px;
    }

    .character-select-header {
        gap: 4px;
    }

    .card-outer:hover,
    .card-selected,
    .card-selected:hover {
        transform: none;
    }
    
    .card-inner hr {
        width: 19cqw;
    }

    .character-select-footer {
        gap: 4px;
    }

    .character-select-footer img {
        width: 134px;
    }

    .character-select-footer p {
        font-size: 10px;
        letter-spacing: 0.25em;
        text-indent: 0.25em;
    }

    .character-select-footer a {
        font-size: 11px;
    }

    .portfolio-header img {
        width: 124px;
        margin: 0;
    }

    .portfolio-header button {
        font-size: 10px;
        letter-spacing: 0.18em;
        text-indent: 0.18em;
        padding: 10px 4px;
        cursor: pointer;
    }

    .portfolio-entry-row {
        flex-direction: column;
        align-items: stretch;
        min-height: 30dvh;
        padding-top: 4dvh;
        gap: 3dvh;
    }

    .portfolio-entry-row:nth-child(even) {
        flex-direction: column;
    }

    .portfolio-entry-row-squares {
        min-height: clamp(400px, 80dvh, 800px);
        gap: 4dvh;
        padding-top: clamp(20px, 1.5dvh, 30px);
        align-items: center;
        justify-content: center;
        scroll-snap-align: start;
    }

    .entry-square-img-wrapper {
        display: flex;
        flex-direction: column;
        gap: 3dvh;
    }

    .square-img-link {
        height: 30dvh;
        width: auto;
    }

    .square-img-link img {
        width: auto;
        height: 100%;
    }

    .square-img {
        align-items: center;
        gap: 8px;
    }

    .img-square-text {
        font-size: 12px;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: color-mix(in srgb, var(--content) 70%, transparent);
    }

    .entry-video-wrapper,
    .entry-img-wrapper {
        flex: none;
    }

    .entry-text-wrapper {
        gap: 12px;
    }

    .entry-title-links-wrapper {
        flex-direction: row;
        align-items: center;
        gap: 12px;
    }

    .entry-links {
        gap: 8px;
        height: 18px;
    }

    .entry-title-links-wrapper .entry-links a {
        margin-top: 0;
        opacity: 0.9;
    }

    .itchio-logo-desktop,
    .soundcloud-logo-desktop {
        display: none;
    }

    .itchio-logo-mobile,
    .soundcloud-logo-mobile {
        display: block;
    }

    .entry-text-wrapper h3,
    .portfolio-entry-row-squares h3 {
        font-size: 18px;
        letter-spacing: 0.06em;
        margin-bottom: 2dvh;
    }

    /* This might need cleaning, it's copying the style above but removing margin-bottom */
    .entry-text-wrapper h3.entry-title-long {
        font-size: 18px;
        letter-spacing: 0.06em;
    }

    .entry-text-wrapper h4 {
        font-size: 14px;
        letter-spacing: 0.06em;
        color: color-mix(in srgb, var(--content) 70%, transparent);
        margin-top: 0;
        margin-bottom: 12px;
    }

    .entry-text-date, 
    .entry-text-role {
        font-size: 11px;
    }

    .entry-text-role {
        margin-bottom: 2dvh;
    }

    .entry-text-wrapper a {
        margin-top: 4dvh;
    }

    .entry-text-description {
        font-size: 12.5px;
        font-weight: 300;
        line-height: 1.7;
        letter-spacing: 0.1em;
        color: color-mix(in srgb, var(--content) 82%, transparent);
    }

    /* Mail CTA */
    .CTA-email {
        gap: 14px;
        margin: 20dvh auto 13dvh;
        /* top and bottom margin slightly different for optical adjustment */
        opacity: 1;
        }

    .CTA-email p:first-child {
        gap: 8px;
        font-size: 24px;
        font-weight: 500;
    }

    .CTA-email p:first-child svg {
        width: 18px;
    }

    .CTA-email p:last-child {
        font-size: 16px;
        letter-spacing: 0.1em;
    }

    /* Drive CTA */
    .CTA-drive p {
        gap: 8px;
        font-size: 18px;
        font-weight: 400;
    }

    .CTA-drive p svg {
        width: 18px;
    }

    /* Tools strip, max width 480px */
    .tools-strip-desktop {
        display: none;
    }
    
    .tools-strip-mobile {
        display: grid;
    }

    footer {
        display: flex;
        flex-direction: column;
        gap: 8px;
        align-items: center;
        padding-bottom: 3dvh;
        margin-top: 7dvh;
    }

    footer a {
        font-size: 13px;
        font-weight: 500;
        letter-spacing: 0.13em;
        color: color-mix(in srgb, var(--content) 64%, transparent);
    }

    footer p {
        font-size: 12px;
        letter-spacing: 0.08em;
        padding: 0;
    }
}

/* Quick fix for iPhone SE and 11, will need refactoring with proper breakpoints */
@media (max-width: 480px) and (max-height: 690px) {
    .card-outer {
        height: 64dvh;
    }
}

/* iPhone 12 and similar, tall screens */
@media (max-width: 480px) and (min-height: 700px) {
    #character-select {
        gap: 3dvh;
    }
    .card-outer {
        height: 54dvh;
    }
}

/* iPhone 14Max and Samsung Galaxy S20 Ultra, unnecessarily tall screens */
@media (max-width: 480px) and (min-height: 900px) {
    #character-select {
        gap: 4dvh;
    }
}

/* Really unnecessarily tall and narrow screens, really guys just stop */
@media (max-width: 480px) and (max-aspect-ratio: 9/19) {
    .card-outer {
        height: 50dvh;
    }

    .character-select-footer p {
        letter-spacing: 0.2em;
        text-indent: 0.2em;
    } 
}

/* Edge case of Galazy Z Fold 5, you're lucky I'm kind enough to handle this bullshit phone */
@media (max-width: 480px) and (max-aspect-ratio: 2/5) {
    .card-outer {
        height: 44dvh;
    }
}

@media (hover: hover) {
    .square-img-link:hover .square-overlay {
        opacity: 1;
    }
}

/* Handles mobile devices in landscape mode */
@media (max-width: 850px) and (orientation: landscape) {
    #app {
        display: none;
    }

    #rotate-message {
        display: flex;
    }
}

@media (prefers-reduced-motion: reduce) {
    .card-outer,
    .card-hero p,
    hr {
        transition: none;
    }

    .card-outer {
        transform: none;
    }
}