/* Core Layout Settings */
:root {
    --pixel-cursor-default: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 24 24'%3E%3Cpath d='M2 1L2 18L7 13L10 20L13 19L10 12L17 12Z' fill='white' stroke='%2316a34a' stroke-width='1.5' stroke-linejoin='round'/%3E%3C/svg%3E") 2 1, auto;
    --pixel-cursor-pointer: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 24 24'%3E%3Cpath d='M8 22h8v-2h2v-7c0-1.1-.9-2-2-2h-1V6.5c0-.83-.67-1.5-1.5-1.5S12 5.67 12 6.5V11h-1V4.5c0-.83-.67-1.5-1.5-1.5S8 3.67 8 4.5V14h-1V7.5C7 6.67 6.33 6 5.5 6S4 6.67 4 7.5v9.1c0 .4.16.78.44 1.06L8 22Z' fill='white' stroke='%2316a34a' stroke-width='1.5' stroke-linejoin='round'/%3E%3C/svg%3E") 7 2, pointer;
}

html, body {
    overflow-x: hidden;
    -ms-overflow-style: none;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

* {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

*::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #f9f7f2;
    color: #1a1a1a;
    cursor: var(--pixel-cursor-default);
    margin: 0;
    padding-top: 112px;
    overflow-x: hidden;
}

::selection {
    background: #86efac;
    color: #052e16;
}

::-moz-selection {
    background: #86efac;
    color: #052e16;
}

body[data-theme='accessible'] ::selection {
    background: #bfdbfe;
    color: #1234db;
}

body[data-theme='accessible'] ::-moz-selection {
    background: #bfdbfe;
    color: #1234db;
}

body[data-page='home'][data-theme='accessible'] ::selection {
    background: #bfdbfe;
    color: #ffffff;
}

body[data-page='home'][data-theme='accessible'] ::-moz-selection {
    background: #bfdbfe;
    color: #ffffff;
}

.fixed-top-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    z-index: 1000;
    isolation: isolate;
}

.fixed-top-nav::before {
    content: '';
    position: absolute;
    inset: 0;
    background-color: #f9f7f2;
    z-index: -1;
}

.asym-double-underline {
    position: relative;
    display: inline-block;
    padding-bottom: 0.38em;
}

.asym-double-underline::before,
.asym-double-underline::after {
    content: '';
    position: absolute;
    height: 3px;
    border-radius: 9999px;
    background: #16a34a;
}

.asym-double-underline::before {
    left: 0;
    bottom: 0;
    width: 100%;
    transform: rotate(-1.4deg);
}

.asym-double-underline::after {
    left: 14%;
    bottom: -0.2em;
    width: 74%;
    transform: rotate(1.8deg);
}

.page-title {
    font-size: clamp(2.2rem, 5.5vw, 3.1rem);
    line-height: 1.05;
    letter-spacing: -0.02em;
}

.page-subtitle {
    font-size: 1rem;
    line-height: 1.65;
    color: #57534e;
    font-weight: 500;
}

.body-copy {
    font-size: 1rem;
    line-height: 1.72;
    color: #44403c;
}

@media (min-width: 768px) {
    .page-subtitle,
    .body-copy {
        font-size: 1.125rem;
    }
}

a,
button,
input[type='button'],
input[type='submit'],
[role='button'],
summary,
label[for],
[data-mobile-menu-toggle],
[onclick],
.cursor-pointer,
.fan-card,
.about-card,
canvas,
[id='carousel-track'] {
    cursor: var(--pixel-cursor-pointer) !important;
}

/* Keep the green custom pointer on nested nodes inside clickable UI. */
a *,
button *,
[role='button'] *,
[onclick] *,
.cursor-pointer * {
    cursor: var(--pixel-cursor-pointer) !important;
}

a:hover,
button:hover,
input[type='button']:hover,
input[type='submit']:hover,
[role='button']:hover,
summary:hover,
label[for]:hover,
[data-mobile-menu-toggle]:hover,
[onclick]:hover,
.cursor-pointer:hover,
.fan-card:hover,
.about-card:hover,
canvas:hover,
[id='carousel-track']:hover {
    cursor: var(--pixel-cursor-pointer) !important;
}

#carousel-track,
#carousel-track *,
#carousel-prev,
#carousel-next,
#project-action-button {
    cursor: var(--pixel-cursor-pointer) !important;
}

#carousel-prev,
#carousel-next {
    touch-action: manipulation;
}

.a11y-toggle-wrap {
    position: fixed;
    top: calc(2.75rem + env(safe-area-inset-top, 0px));
    right: calc(2.5rem + env(safe-area-inset-right, 0px));
    z-index: 1100;
}

.a11y-toggle-stack {
    display: grid;
    grid-template-columns: auto auto;
    grid-template-rows: auto auto;
    column-gap: 0.65rem;
    row-gap: 0.35rem;
    justify-items: end;
    align-items: center;
}

.a11y-toggle-row {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 2.25rem;
}

.a11y-social-link,
.a11y-mode-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.a11y-social-link {
    width: 3.25rem;
    height: 3.25rem;
    background: #0a66c2;
    border-radius: 0.85rem;
    overflow: hidden;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.a11y-social-link:hover,
.a11y-social-link:focus-visible {
    opacity: 0.7;
}

.a11y-social-link:focus-visible,
.a11y-mode-label:focus-visible {
    outline: 3px solid #005fcc;
    outline-offset: 2px;
}

.a11y-social-link svg {
    width: 100%;
    height: 100%;
    display: block;
}

.a11y-social-link rect {
    fill: #0a66c2;
}

.a11y-social-link text {
    fill: #ffffff;
}

body[data-theme='accessible'] .a11y-social-link rect {
    fill: #ffffff !important;
}

body[data-theme='accessible'] .a11y-social-link text {
    fill: #0a66c2 !important;
}

.a11y-mode-label {
    grid-column: 2;
    justify-self: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.28rem;
    position: relative;
    color: #1a1a1a;
    width: 3.15rem;
    font-size: 0.62rem;
    font-weight: 900;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    line-height: 0.88;
    text-align: center;
}

.a11y-mode-label:hover {
    opacity: 0.75;
}

.a11y-mode-label span {
    display: block;
}

.a11y-mobile-mode-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.22rem;
    color: #1a1a1a;
    font-size: 0.52rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    line-height: 0.86;
    text-transform: uppercase;
    text-align: center;
}

.a11y-social-link-mobile {
    width: 2.35rem;
    height: 2.35rem;
}

.a11y-social-link-mobile svg {
    width: 100%;
    height: 100%;
}

.a11y-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0;
    border: 2px solid #1a1a1a;
    border-radius: 9999px;
    padding: 0.3rem;
    min-width: 44px;
    min-height: 44px;
    background: #ffffff;
    color: #1a1a1a;
    box-shadow: 3px 3px 0 0 rgba(26, 26, 26, 1);
}

/* Keep the inline nav switch aligned with the nav row controls. */
nav .a11y-toggle {
    min-width: 42px;
    min-height: 42px;
    padding: 0.2rem;
}

nav.grid.grid-cols-3 {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
}

nav.grid.grid-cols-3 > div {
    display: flex;
    align-items: center;
    min-height: 44px;
}

nav.grid.grid-cols-3 > div:last-child {
    justify-content: flex-end;
}

.nav-inline-toggle {
    margin: 0;
    top: auto;
    transform: none;
    align-self: center;
}

.a11y-toggle:hover {
    background: #f2f2f2;
}

.a11y-toggle:focus-visible {
    outline: 3px solid #005fcc;
    outline-offset: 2px;
}

.a11y-switch-track {
    width: 2.4rem;
    height: 1.35rem;
    border-radius: 9999px;
    border: 2px solid #1a1a1a;
    background: #ececec;
    position: relative;
    display: inline-flex;
    align-items: center;
}

.a11y-switch-thumb {
    width: 0.88rem;
    height: 0.88rem;
    border-radius: 9999px;
    background: #1a1a1a;
    position: absolute;
    left: 0.15rem;
    top: 50%;
    transform: translateY(-50%);
}

.a11y-toggle.is-active {
    background: #dcfce7;
    border-color: #166534;
    color: #14532d;
}

.a11y-toggle.is-active .a11y-switch-track {
    background: #16a34a;
    border-color: #166534;
}

.a11y-toggle.is-active .a11y-switch-thumb {
    background: #ffffff;
    left: 1.2rem;
}

body[data-theme='accessible'] {
    font-size: 112%;
    line-height: 1.65;
    background-color: #1234db !important;
    color: #ffffff !important;
    --pixel-cursor-default: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 24 24'%3E%3Cpath d='M2 1L2 18L7 13L10 20L13 19L10 12L17 12Z' fill='white' stroke='%2316a34a' stroke-width='1.5' stroke-linejoin='round'/%3E%3C/svg%3E") 2 1, auto;
    --pixel-cursor-pointer: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 24 24'%3E%3Cpath d='M8 22h8v-2h2v-7c0-1.1-.9-2-2-2h-1V6.5c0-.83-.67-1.5-1.5-1.5S12 5.67 12 6.5V11h-1V4.5c0-.83-.67-1.5-1.5-1.5S8 3.67 8 4.5V14h-1V7.5C7 6.67 6.33 6 5.5 6S4 6.67 4 7.5v9.1c0 .4.16.78.44 1.06L8 22Z' fill='white' stroke='%2316a34a' stroke-width='1.5' stroke-linejoin='round'/%3E%3C/svg%3E") 7 2, pointer;
}

body[data-theme='accessible'] .fixed-top-nav::before {
    background-color: #1234db;
}

@media (max-width: 768px) {
    body {
        padding-top: 92px;
    }
}

body[data-theme='accessible'] .asym-double-underline::before,
body[data-theme='accessible'] .asym-double-underline::after {
    background: #ffffff;
}

body[data-theme='accessible'] h1,
body[data-theme='accessible'] h2,
body[data-theme='accessible'] h3,
body[data-theme='accessible'] h4,
body[data-theme='accessible'] h5,
body[data-theme='accessible'] h6 {
    color: #ffffff !important;
    letter-spacing: 0.01em;
}

body[data-theme='accessible'] p,
body[data-theme='accessible'] li,
body[data-theme='accessible'] a,
body[data-theme='accessible'] button,
body[data-theme='accessible'] input,
body[data-theme='accessible'] textarea,
body[data-theme='accessible'] label,
body[data-theme='accessible'] span,
body[data-theme='accessible'] div {
    color: #ffffff;
}

body[data-theme='accessible'] a {
    color: #ffffff !important;
    text-decoration: underline;
    text-underline-offset: 0.16em;
}

body[data-theme='accessible'] nav a {
    text-decoration: underline !important;
    text-underline-offset: 0.16em;
}

body[data-theme='accessible'] nav.grid.grid-cols-3 > div:nth-child(2) > a {
    border-color: #ffffff !important;
}

body[data-theme='accessible'] [class*="text-stone-"],
body[data-theme='accessible'] [class*="text-gray-"],
body[data-theme='accessible'] [class*="text-zinc-"] {
    color: #ffffff !important;
}

body[data-theme='accessible'] [class*="bg-stone-"],
body[data-theme='accessible'] [class*="bg-gray-"] {
    background-color: #1234db !important;
}

body[data-theme='accessible'] [class*="bg-#"],
body[data-theme='accessible'] [class*="bg-["] {
    background-color: #1234db !important;
}

body[data-theme='accessible'] .project-tag,
body[data-theme='accessible'] .footer-brand {
    border-color: #ffffff !important;
    color: #1234db !important;
    background: #ffffff !important;
}

body[data-theme='accessible'] .service-pill {
    border: 2px solid #ffffff;
}

body[data-theme='accessible'] .chat-cta {
    background: #ffffff !important;
    color: #1234db !important;
    border: 2px solid #ffffff;
    text-decoration: none !important;
}

body[data-theme='accessible'] .carousel-cta {
    background: #ffffff !important;
    color: #1234db !important;
    border: 2px solid #ffffff;
}

body[data-theme='accessible'] .about-card {
    box-shadow: 8px 8px 0 0 #ffffff;
}

body[data-theme='accessible'] .fan-card {
    box-shadow: 6px 6px 0 0 #ffffff !important;
    border: 2px solid #1234db !important;
}

body[data-theme='accessible'] .fan-card h1,
body[data-theme='accessible'] .fan-card h2,
body[data-theme='accessible'] .fan-card h3,
body[data-theme='accessible'] .fan-card p,
body[data-theme='accessible'] .fan-card span,
body[data-theme='accessible'] .fan-card div {
    color: #1234db !important;
}

/* Keep project surfaces readable in accessible mode (white surface + blue text). */
body[data-theme='accessible'] .project-card,
body[data-theme='accessible'] #project-detail {
    background: #ffffff !important;
    border-color: #1234db !important;
}

body[data-theme='accessible'] #project-detail {
    box-shadow: 10px 10px 0 0 #ffffff !important;
}

body[data-theme='accessible'] .project-card {
    box-shadow: 8px 8px 0 0 #ffffff !important;
}

body[data-theme='accessible'] .project-card:hover {
    box-shadow: 12px 12px 0 0 #ffffff !important;
}

body[data-theme='accessible'] #project-image,
body[data-theme='accessible'] #hero-image-wrapper {
    box-shadow: 8px 8px 0 0 #ffffff !important;
}

body[data-theme='accessible'] #project-image,
body[data-theme='accessible'] #hero-image-wrapper {
    border-color: #1234db !important;
}

body[data-theme='accessible'] .project-card,
body[data-theme='accessible'] .project-card * {
    text-decoration: none !important;
}

body[data-theme='accessible'] #cta-container a,
body[data-theme='accessible'] #audio-button-container a,
body[data-theme='accessible'] #project-detail a.bg-\[\#16a34a\],
body[data-theme='accessible'] #project-detail a.bg-\[\#1234db\] {
    background: #1234db !important;
    color: #ffffff !important;
    border: 2px solid #ffffff !important;
    text-decoration: none !important;
}

/* Keep the project Figma CTA at the same visual size in both themes. */
body[data-theme='accessible'] #project-detail #cta-container a {
    border-width: 0 !important;
    padding: 1rem 2rem !important;
    font-size: 1rem !important;
    line-height: 1.5rem !important;
}

body[data-theme='accessible'] .project-card h1,
body[data-theme='accessible'] .project-card h2,
body[data-theme='accessible'] .project-card h3,
body[data-theme='accessible'] .project-card p,
body[data-theme='accessible'] .project-card div,
body[data-theme='accessible'] #project-detail h1,
body[data-theme='accessible'] #project-detail h2,
body[data-theme='accessible'] #project-detail h3,
body[data-theme='accessible'] #project-detail p,
body[data-theme='accessible'] #project-detail a,
body[data-theme='accessible'] #project-detail li,
body[data-theme='accessible'] #project-detail span,
body[data-theme='accessible'] #project-detail div {
    color: #1234db !important;
}

body[data-theme='accessible'] .project-card .project-tag,
body[data-theme='accessible'] #project-tags span {
    background: #1234db !important;
    color: #ffffff !important;
    border-color: #ffffff !important;
    border-width: 2px !important;
}

body[data-theme='accessible'] .project-status-ribbon {
    color: #1234db !important;
    background: #ffffff !important;
    border-color: #1234db !important;
}

/* Keep the Key Impact callout readable in accessible mode. */
body[data-theme='accessible'] #project-detail #key-impact-section {
    background: #ffffff !important;
    border-color: #1234db !important;
    box-shadow: 4px 4px 0 0 #1234db !important;
}

body[data-theme='accessible'] #project-detail #key-impact-section h2,
body[data-theme='accessible'] #project-detail #key-impact-section ul,
body[data-theme='accessible'] #project-detail #key-impact-section li,
body[data-theme='accessible'] #project-detail #key-impact-section span,
body[data-theme='accessible'] #project-detail #key-impact-section strong {
    color: #1234db !important;
}

body[data-theme='accessible'] .project-card .relative.h-72,
body[data-theme='accessible'] .project-card-media,
body[data-theme='accessible'] #hero-image-wrapper,
body[data-theme='accessible'] #process-gallery > div,
body[data-theme='accessible'] #process-video-gallery > div,
body[data-theme='accessible'] #hero-video-block,
body[data-theme='accessible'] #project-image,
body[data-theme='accessible'] #project-detail video {
    background: transparent !important;
}


body[data-theme='accessible'] .a11y-toggle {
    background: #ffffff;
    color: #1234db;
    border-color: #1234db;
    box-shadow: 3px 3px 0 0 #ffffff;
}

body[data-theme='accessible'] .a11y-switch-track {
    border-color: #1234db;
    background: #d8e0ff;
}

body[data-theme='accessible'] .a11y-switch-thumb {
    background: #1234db;
}

body[data-theme='accessible'] [data-mobile-menu-toggle],
body[data-theme='accessible'] [id^='mobile-nav-menu-'] {
    border-color: #ffffff !important;
}

body[data-theme='accessible'] #carousel-prev,
body[data-theme='accessible'] #carousel-next {
    background: #ffffff !important;
    color: #1234db !important;
    border-color: #1234db !important;
    box-shadow: 3px 3px 0 0 #ffffff !important;
}

body[data-theme='accessible'] [id^='mobile-nav-menu-'] a {
    color: #1234db !important;
    text-decoration: none !important;
}

body[data-theme='accessible'] *,
body[data-theme='accessible'] *::before,
body[data-theme='accessible'] *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
}

#projects {
    min-width: 0;
}

/* Smooth fluid transitions for cards */
.fan-card, .about-card {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
                box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
                z-index 0.1s step-end;
}

.about-card {
    box-shadow: 8px 8px 0 0 #000000;
}

.about-map-wrap {
    position: relative;
    width: min(100%, 27rem);
    margin-top: 0.65rem;
}

.about-map-bg {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

#project-detail {
    box-shadow: 10px 10px 0 0 #1a1a1a;
}

.project-card {
    border-color: #1a1a1a;
}

.project-card-media {
    background: transparent;
    border-radius: 1.5rem;
    overflow: hidden;
}

.project-card-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 0;
}

.media-frame {
    border: 2px solid #1a1a1a;
    border-radius: 1.75rem;
    overflow: hidden;
    background: transparent;
}

.media-frame img,
.media-frame video {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: inherit;
}

.media-video-shell {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #e7e5e4;
}

.media-video-player {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: inherit;
    background: transparent;
}

.media-video-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.06));
    transition: opacity 0.28s ease;
}

.media-video-play-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.85);
    background: rgba(17, 24, 39, 0.55);
    color: #ffffff;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    padding: 0.42rem 0.72rem;
    backdrop-filter: blur(2px);
}

.media-video-play-badge svg {
    width: 0.9rem;
    height: 0.9rem;
}

.media-video-shell:hover .media-video-overlay {
    opacity: 0.84;
}

.media-video-shell.is-playing .media-video-overlay {
    opacity: 0;
}

body[data-theme='accessible'] .media-video-play-badge {
    background: rgba(18, 52, 219, 0.72);
    border-color: rgba(255, 255, 255, 0.95);
}

.media-block {
    margin: 0;
}

.media-caption {
    margin-top: 0.55rem;
    color: #57534e;
    font-size: 0.82rem;
    line-height: 1.4;
    font-weight: 600;
}

body[data-theme='accessible'] .media-frame {
    border-color: #1234db !important;
}

/* Remove shadows only on the large detail hero media blocks. */
#project-detail #project-image,
#project-detail #hero-image-wrapper {
    box-shadow: none !important;
}

/* Hide native default browser scrollbars */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Top navigation link sizing */
nav.grid.grid-cols-3 a {
    font-size: 1rem;
}

/* Footer brand pill style */
.footer-brand {
    font-family: 'Playpen Sans', cursive;
    font-weight: 800;
    display: inline-block;
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    border: 1px solid #1a1a1a;
    background-color: #f9f7f2;
    color: #16a34a;
    text-transform: lowercase;
    letter-spacing: 0.04em;
    font-size: 0.9rem;
    white-space: nowrap;
}

.footer-made-line {
    margin-top: -0.2rem;
    color: #57534e;
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 0.02em;
    text-transform: lowercase;
}

/* Setup the bouncing letter architecture */
.hover-jump {
    display: inline-block;
    animation: bounceWave 1.2s ease-in-out;
    animation-delay: calc(0.06s * var(--i)); /* Smooth wave sequence offset */
    transition: transform 0.2s ease;
}

/* Retrigger a quick tactical hop on cursor hover */
.hover-jump:hover {
    transform: translateY(-8px) scale(1.1);
    color: #16a34a; /* Green accent match */
}

/* The core loading entry bounce physics */
@keyframes bounceWave {
    0%, 100% { transform: translateY(0); }
    30%      { transform: translateY(-12px) scaleY(1.05); } /* Stretch at apex */
    50%      { transform: translateY(2px) scaleY(0.95); }   /* Soft squash compression impact */
}

/* Responsive helpers */
html {
    max-width: 100%;
}
*, *::before, *::after {
    box-sizing: border-box;
}
body {
    min-width: 0;
}

main {
    padding-inline: 1rem;
}

@media (max-width: 1024px) {
    nav.grid.grid-cols-3 {
        max-width: 90vw;
    }
}

@media (max-width: 768px) {
    header.w-full {
        padding-top: 1rem;
        padding-bottom: 1rem;
    }

    main {
        padding-inline: 1rem !important;
    }

    .footer-made-line {
        font-size: 0.72rem;
    }

    .project-card {
        max-width: 100%;
    }

    .project-card .project-card-media {
        height: 15rem;
    }

    #project-detail {
        padding: 1.2rem;
        border-radius: 1.4rem;
    }

    #project-detail .grid.grid-cols-2.md\:grid-cols-4,
    #project-detail .grid.grid-cols-2.md\:grid-cols-4.gap-6.border-y-2 {
        gap: 1rem;
        padding-top: 1rem;
        padding-bottom: 1rem;
    }

    #project-detail h1 {
        font-size: 2rem;
        line-height: 1.05;
    }

    #project-detail h2 {
        font-size: 1.3rem;
    }

    .fan-card {
        width: min(220px, 70vw);
        height: 280px;
        min-height: 280px;
    }

    #carousel-prev,
    #carousel-next {
        width: 2.35rem;
        height: 2.35rem;
    }

    #carousel-prev {
        left: -0.2rem;
    }

    #carousel-next {
        right: -0.2rem;
    }

    .about-card {
        width: min(154px, 44vw);
        height: min(188px, 54vw);
    }

    #carousel-track {
        min-height: 320px;
    }

    .footer-brand {
        padding: 0.35rem 0.75rem;
    }
}

@media (max-width: 640px) {
    .a11y-toggle-wrap {
        top: calc(env(safe-area-inset-top, 0px) + 0.55rem);
        right: calc(env(safe-area-inset-right, 0px) + 0.55rem);
    }
    .a11y-toggle {
        padding: 0.35rem;
        min-width: 48px;
        min-height: 48px;
        gap: 0;
    }

    nav .a11y-toggle {
        min-width: 42px;
        min-height: 42px;
        padding: 0.2rem;
    }

    nav.grid.grid-cols-3 {
        grid-template-columns: 1fr auto 1fr;
        gap: 0.75rem;
    }

    nav.grid.grid-cols-3 > div {
        text-align: center;
    }

    nav.grid.grid-cols-3 > div:first-child,
    nav.grid.grid-cols-3 > div:last-child {
        align-self: center;
    }

    nav.grid.grid-cols-3 a {
        font-size: 0.82rem;
    }

    [data-mobile-menu-toggle] {
        min-height: 42px;
        padding-inline: 0.75rem;
    }

    .carousel-cta,
    .chat-cta {
        width: 100%;
        max-width: 22rem;
        font-size: 0.82rem !important;
        line-height: 1.05;
        padding: 0.85rem 0.95rem !important;
    }

    #side-quests .max-w-md,
    #side-quests .max-w-xl {
        max-width: 100%;
    }

    .footer-brand {
        font-size: 0.8rem;
        padding: 0.3rem 0.7rem;
    }
}

@media (pointer: coarse) {
    .about-card:hover {
        transform: none;
        box-shadow: none;
    }
}
