:root {
    --font-heading: "Space Mono", monospace;
    --font-body: "Plus Jakarta Sans", sans-serif;
}

body.portfolio-body {
    background-color: #f7f6f4;
    color: #111;
    font-family: var(--font-body);
}

h1,
h2,
h3 {
    font-family: var(--font-heading);
}

.project-bg-beige {
    background-color: #e9dfc7;
}

.project-bg-blue {
    background-color: #cfd6e8;
}

.project-bg-green {
    background-color: #dbe7dc;
}

.project-bg-peach {
    background-color: #f4dfd8;
}

.project-bg-butter {
    background-color: #f5e6a8;
}

#cursorTooltip {
    position: fixed;
    top: 0;
    left: 0;
    padding: .7rem 1rem;
    background: rgba(217, 234, 245, 60%);
    color: #000;
    border-radius: 12px;
    font-size: .9rem;
    font-weight: 500;
    pointer-events: none;
    opacity: 0;
    transform: translate(-50%, -120%);
    transition: opacity .15s ease;
    z-index: 9999;
    white-space: nowrap;
}

#cursorTooltip.show {
    opacity: 1;
}

.site-footer {
    font-size: 14px;
    color: #666;
}

.reveal-on-scroll {
    opacity: 0;
    transform: translateY(28px);
    transition:
        opacity 0.7s ease,
        transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform;
}

.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
.reveal-on-scroll {
    opacity: 1;
    transform: none;
    transition: none;
}
}

html {
    scroll-behavior: smooth;
}

.back-to-top {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    z-index: 1030;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    padding: 0;
    color: #ffffff;
    font-size: 1.5rem;
    line-height: 1;
    background: #151515;
    border: 0;
    border-radius: 50%;
    box-shadow: 0 0.5rem 2rem rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(1rem);
    pointer-events: none;
    transition:
        opacity 0.25s ease,
        visibility 0.25s ease,
        transform 0.25s ease,
        background-color 0.2s ease,
        box-shadow 0.2s ease,
        filter 0.2s ease;
}

.back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.back-to-top:hover {
    background: var(--home-centered-green);
}

.back-to-top:focus-visible {
    outline: 3px solid #6d7fa8;
    outline-offset: 4px;
}

@media (max-width: 767.98px) {
.back-to-top {
    right: 1rem;
    bottom: 1rem;
    width: 3rem;
    height: 3rem;
    font-size: 1.25rem;
}
}

@media (prefers-reduced-motion: reduce) {
.back-to-top {
    transition: none;
}
}

.back-to-top > svg {
    display:block;
    width:1.5rem;
    height:1.5rem;
    flex:none;
}

@media (hover:hover) and (pointer:fine) {
    .portfolio-body .back-to-top.is-visible:hover {
        transform:translateY(-2px);
        filter:brightness(1.12);
        box-shadow:0 .6rem 1.8rem rgba(0,0,0,.18);
    }
}

@media (prefers-reduced-motion:reduce) {
    .portfolio-body .back-to-top.is-visible:hover {
        transform:none;
    }
}

.site-footer .site-footer-row {
    display:flex;
    align-items:center;
    justify-content:center;
    flex-wrap:wrap;
    gap:1rem;
}

.site-footer-credit {
    line-height:1.5;
}

.site-footer-separator {
    width:1px;
    height:1.1rem;
    flex:none;
    background:currentColor;
    opacity:.35;
}

.site-footer-email {
    display:inline-flex;
    align-items:center;
    gap:.5rem;
    color:inherit;
    text-decoration:none;
    line-height:1.5;
}

.site-footer-email svg {
    flex:none;
    display:block;
}

.site-footer-email:hover {
    color:inherit;
    text-decoration:underline;
    text-underline-offset:.2em;
}

.site-footer-email:focus-visible {
    outline:2px solid #8d2dfb;
    outline-offset:4px;
    border-radius:3px;
}

@media (max-width:575.98px) {
    .site-footer .site-footer-row {
        flex-direction:column;
        gap:.6rem;
    }

    .site-footer-separator {
        display:none;
    }
}

/* Use the Refer project heading layout consistently across the case studies. */
@media (max-width:700px) {
    .portfolio-body :is(.sso-hero-bottom,.raf-hero-bottom,.nav-hero-bottom,.ps-hero-bottom,.bx-hero-bottom) {
        flex-direction:column;
        align-items:flex-start;
        gap:1rem;
    }

    .portfolio-body :is(.sso-hero-bottom,.raf-hero-bottom,.nav-hero-bottom,.ps-hero-bottom,.bx-hero-bottom) > div {
        flex:none;
        width:100%;
        min-width:0;
    }

    .portfolio-body :is(.sso-hero-bottom,.raf-hero-bottom,.nav-hero-bottom,.ps-hero-bottom,.bx-hero-bottom) h1 {
        max-width:none;
    }

    .portfolio-body :is(.sso-live,.raf-live,.nav-live,.bx-live) {
        align-self:flex-start;
    }

    .portfolio-body .raf-hero h1 {
        white-space:nowrap;
    }
}
