:root {
    --text-size-increase: 2pt;
    --navbar-height: 2rem;
}

@media (max-width: 460px) {
    :root {
        --navbar-height: 2.5rem;
    }

    .nav-links {
        flex-wrap: nowrap;
        gap: 0;
        column-gap: 2px !important;
        row-gap: 0 !important;
    }

    #page-top [data-name="nav-link"] {
        padding-left: 0.125rem;
        padding-right: 0.125rem;
        font-size: clamp(0.55rem, 2.7vw, 0.65rem) !important;
        white-space: nowrap;
    }
}

@media (min-width: 640px) {
    :root {
        --navbar-height: 2.25rem;
    }
}

@media (min-width: 640px) and (max-width: 710px) {
    :root {
        --navbar-height: 5rem;
    }
}

body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    background: #ff69b4;
    font-family: 'Forum', serif;
    font-size: calc(1rem + var(--text-size-increase)) !important;
}

.no-script-content {
    width: min(100% - 2rem, 70rem);
    margin: 0 auto;
    padding: 1.5rem 0;
    color: #fff;
    line-height: 1.5;
}

.no-script-content nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
}

.navbar-home-icon {
    position: absolute;
    top: calc(50% + 5px);
    left: 50%;
    display: block;
    width: auto;
    height: 3.15em;
    transform: translate(-50%, -50%) rotate(-5deg);
    pointer-events: none;
}

#page-top .nav-home-link:hover .navbar-home-icon,
#page-top .nav-home-link:focus-visible .navbar-home-icon {
    animation: header-moon-rock 220ms ease-in-out infinite alternate;
}

@keyframes header-moon-rock {
    from {
        transform: translate(-50%, -50%) rotate(-10deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(0deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    #page-top .nav-home-link:hover .navbar-home-icon,
    #page-top .nav-home-link:focus-visible .navbar-home-icon {
        animation: none;
    }
}

.nav-home-link {
    position: relative;
    width: 2.75em;
    height: 1em;
    margin-right: 0.325em;
    flex: 0 0 auto;
}

.nav-links {
    column-gap: 4px !important;
}

@media (min-width: 640px) {
    .nav-links {
        column-gap: 18px !important;
    }
}

a:hover,
a:focus-visible {
    color: hsl(30, 100%, 60%);
}

@media (prefers-reduced-motion: no-preference) {
    a:hover,
    a:focus-visible {
        animation: link-color-cycle 0.9s linear infinite;
    }
}

@keyframes link-color-cycle {
    0% { color: hsl(30, 100%, 60%); }
    14% { color: hsl(60, 100%, 60%); }
    28% { color: hsl(90, 100%, 60%); }
    42% { color: hsl(120, 100%, 60%); }
    56% { color: hsl(150, 100%, 60%); }
    70% { color: hsl(180, 100%, 60%); }
    84% { color: hsl(210, 100%, 60%); }
    100% { color: hsl(258, 100%, 60%); }
}

.text-xs {
    font-size: calc(0.75rem + var(--text-size-increase)) !important;
}

.text-sm {
    font-size: calc(0.875rem + var(--text-size-increase)) !important;
}

.text-base {
    font-size: calc(1rem + var(--text-size-increase)) !important;
}

.text-lg {
    font-size: calc(1.125rem + var(--text-size-increase)) !important;
}

.text-xl {
    font-size: calc(1.25rem + var(--text-size-increase)) !important;
}

.text-2xl {
    font-size: calc(1.5rem + var(--text-size-increase)) !important;
}

.text-3xl {
    font-size: calc(1.875rem + var(--text-size-increase)) !important;
}

.text-4xl {
    font-size: calc(2.25rem + var(--text-size-increase)) !important;
}

.text-5xl {
    font-size: calc(3rem + var(--text-size-increase)) !important;
}

.text-6xl {
    font-size: calc(3.75rem + var(--text-size-increase)) !important;
}

.text-7xl {
    font-size: calc(4.5rem + var(--text-size-increase)) !important;
}

.text-8xl {
    font-size: calc(6rem + var(--text-size-increase)) !important;
}

.text-9xl {
    font-size: calc(8rem + var(--text-size-increase)) !important;
}

@media (min-width: 640px) {
    [class~="sm:text-sm"] {
        font-size: calc(0.875rem + var(--text-size-increase)) !important;
    }
}

canvas {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    image-rendering: optimizeSpeed;
    image-rendering: -moz-crisp-edges;
    image-rendering: -o-crisp-edges;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: optimize-contrast;
    image-rendering: crisp-edges;
    image-rendering: pixelated;
}

pre {
    margin: 0;
    user-select: none;
    padding: 0;
    line-height: 1em;
    text-align: left;
    position: absolute;
    left: 0;
    top: 0;
    background-image: radial-gradient(circle, #ff6188 0%, #fc9867 50%, #ffd866 100%);
    background-attachment: fixed;
    -webkit-text-fill-color: transparent;
    -webkit-background-clip: text;
    z-index: 9;
    mix-blend-mode: difference;
}

.aspect-[3\/4] {
    aspect-ratio: 3/4;
}

.poster-dialog {
    padding: clamp(0.5rem, 2vw, 1.25rem);
}

.hero-viewport {
    height: calc(100vh - var(--navbar-height));
}

.hero-page-min-height {
    min-height: calc(100vh - var(--navbar-height));
}

.sizzle-reel-page {
    display: flex;
    min-height: calc(100vh - var(--navbar-height));
    flex-direction: column;
    align-items: center;
    color: #fff;
}

.sizzle-reel-media {
    display: flex;
    width: 100%;
    min-height: calc(50vh - var(--navbar-height) / 2 + min(21.09375vw, 37.5vh));
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
}

.sizzle-reel-copy {
    width: min(100%, 70rem);
    padding: 0 1.5rem 2rem;
    line-height: 1.5;
}

.sizzle-reel-video {
    width: min(75vw, 133.333vh);
    max-width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
}

.projects-poster-tile {
    aspect-ratio: 3 / 4;
}

@supports not (aspect-ratio: 3 / 4) {
    .projects-poster-tile::before {
        content: "";
        display: block;
        padding-top: 133.333%;
    }
}

@supports (height: 100dvh) {
    .hero-viewport {
        height: calc(100dvh - var(--navbar-height));
    }

    .hero-page-min-height {
        min-height: calc(100dvh - var(--navbar-height));
    }

    .sizzle-reel-page {
        min-height: calc(100dvh - var(--navbar-height));
    }

    .sizzle-reel-media {
        min-height: calc(50dvh - var(--navbar-height) / 2 + min(21.09375vw, 37.5dvh));
    }
}

@media (max-width: 640px) {
    .about-content {
        justify-content: flex-start !important;
        transform: none !important;
        padding-top: 1.5rem;
    }

    .sizzle-reel-media {
        min-height: auto;
        align-items: flex-start;
        padding: 0.5rem 1rem;
    }
}

.poster-info {
    font-size: clamp(
        calc(0.875rem + var(--text-size-increase)),
        calc(1.5vw + var(--text-size-increase)),
        calc(1rem + var(--text-size-increase))
    );
    line-height: 1.125;
}

.poster-info h2 {
    font-size: clamp(
        calc(1.125rem + var(--text-size-increase)),
        calc(3vw + var(--text-size-increase)),
        calc(1.5rem + var(--text-size-increase))
    );
}

.about-content {
    font-size: calc(1rem + 3pt);
    transform: translateY(-13.5vh);
}

.poster-info img,
.poster-info video,
.poster-info iframe {
    max-width: 100%;
    max-height: 70vh;
}

.poster-info img,
.poster-info video {
    height: auto;
    object-fit: contain;
}

.poster-info iframe {
    height: auto;
}

.hero-poster-grid {
    width: 100%;
    height: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(3, minmax(0, 1fr));
}

.ascii-text-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fdf9f3;
    font-family: 'Forum', serif;
    font-size: calc(4rem + var(--text-size-increase));
    font-size: clamp(
        calc(3rem + var(--text-size-increase)),
        calc(15vw + var(--text-size-increase)),
        calc(12rem + var(--text-size-increase))
    );
    font-weight: 600;
    text-align: center;
}

.hero-poster-grid img:nth-child(n + 7) {
    display: none;
}

.projects-poster-tile img {
    transform-origin: center;
    transition: transform 150ms ease-out;
}

.projects-poster-tile:hover img,
.projects-poster-tile:focus-visible img {
    z-index: 10;
    transform: scale(1.02);
}

.projects-poster-tile img {
    transform-origin: center;
    transition: transform 150ms ease-out;
}

.projects-poster-tile:hover img,
.projects-poster-tile:focus-visible img {
    z-index: 10;
    transform: scale(1.02);
}

.error-page {
    width: min(100% - 2rem, 70rem);
    margin: 0 auto;
    padding: 2rem 0;
    color: #fff;
}

@media (min-width: 768px) {
    .hero-poster-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        grid-template-rows: repeat(2, minmax(0, 1fr));
    }

    .hero-poster-grid img:nth-child(n + 7) {
        display: block;
    }
}
