@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;700&family=Space+Grotesk:wght@500;600;700&family=Syne:wght@500;600;700&display=swap");

* {
    box-sizing: border-box;
}

:root {
    color-scheme: dark;
    --background: #08090a;
    --surface: #111315;
    --surface-hover: #17191c;
    --text: #f4f4f1;
    --muted: #aaaead;
    --line: #2b2e31;
}

html {
    scroll-behavior: smooth;
    background: var(--background);
}

body {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 24px;
    color: var(--muted);
    background: var(--background);
    font-family: Arial, sans-serif;
    line-height: 1.6;
}

h1,
h2,
h3 {
    color: var(--text);
    font-family: "Space Grotesk", "Segoe UI", sans-serif;
    letter-spacing: -0.025em;
}

.site-header,
section,
footer {
    margin-bottom: 64px;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    margin-bottom: 72px;
    padding: 32px 0 20px;
    background: rgba(8, 9, 10, 0.97);
    border-bottom: 1px solid var(--line);
    text-align: center;
    transform: translateY(0);
    transition: transform 240ms cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 240ms ease;
    backdrop-filter: blur(12px);
}

.site-header.is-scroll-active {
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.38);
}

.site-header.is-scroll-hidden {
    transform: translateY(-110%);
}

.mobile-scroll-header.is-handoff {
    transition: none !important;
}

.header-layout {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.header-layout > .site-logo {
    order: 1;
    flex: 0 0 100%;
}

#projects {
    padding-top: 48px;
    border-top: 1px solid var(--line);
}

#more-of-me {
    padding-top: 48px;
    border-top: 1px solid var(--line);
}

#about {
    scroll-margin-top: 72px;
}

.about-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(230px, 315px);
    gap: clamp(32px, 6vw, 72px);
    align-items: center;
}

.about-copy {
    font-family: "Manrope", "Segoe UI", sans-serif;
    font-weight: 300;
}

.about-copy p {
    margin: 0;
    max-width: 680px;
}

.about-copy p + p {
    margin-top: 1.25em;
}

.about-extra {
    margin-top: 1.25em;
}

.about-more-toggle {
    display: none;
}

.about-copy strong {
    color: var(--text);
    font-size: 1.1em;
    font-weight: 700;
}

.about-portrait {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    object-position: center 35%;
    border-radius: 50%;
    transform: translateY(-14px);
}

#about > h2,
#projects > h2,
#more-of-me > h2,
.contact-footer > h2 {
    margin: 0 0 26px;
    font-size: clamp(2.1rem, 4vw, 2.8rem);
    line-height: 1.05;
}

.site-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    color: var(--text);
    font-family: "Syne", "Segoe UI", sans-serif;
    font-size: clamp(3rem, 5vw, 4rem);
    font-weight: 600;
    letter-spacing: -0.055em;
    line-height: 0.95;
    text-decoration: none;
}

.brand-mark {
    display: block;
    width: 92px;
    height: 92px;
    overflow: hidden;
    flex: 0 0 auto;
    background: #000;
}

.brand-mark img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.8);
}

.brand-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    min-height: 92px;
    gap: 5px;
    text-align: left;
}

.brand-name {
    line-height: 0.95;
}

.tagline {
    margin-top: 0;
    color: #929695;
    font-family: Arial, "Helvetica Neue", sans-serif;
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0.015em;
    line-height: 1.2;
}

.header-nav,
.mobile-navigation {
    font-family: "Space Grotesk", "Segoe UI", sans-serif;
    font-size: 1.22rem;
    font-weight: 600;
    letter-spacing: 0.015em;
}

.header-nav {
    order: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 24px 0 0;
}

.header-nav-left {
    margin-right: 5px;
}

.header-nav-right {
    margin-left: 5px;
}

.language-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0;
    padding: 3px;
    border: 1px solid #555957;
    border-radius: 999px;
    background: #17191a;
    margin-left: 14px;
    flex-shrink: 0;
    width: max-content;
}

.language-switch::before {
    content: "";
    position: absolute;
    top: 3px;
    bottom: 3px;
    left: 3px;
    width: calc((100% - 6px) / 2);
    border-radius: 999px;
    background: var(--text);
    transform: translateX(0);
    transition: transform 200ms ease;
    pointer-events: none;
}

html[lang="zh-CN"] .language-switch::before {
    transform: translateX(100%);
}

.language-switch button {
    position: relative;
    display: grid;
    width: 44px;
    height: 44px;
    padding: 0;
    place-items: center;
    color: var(--muted);
    background: transparent;
    border: 0;
    border-radius: 999px;
    font: 700 0.78rem "Space Grotesk", "Segoe UI", sans-serif;
    line-height: 1;
    cursor: pointer;
    transition: background 160ms ease;
}

.language-flag {
    display: block;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    overflow: hidden;
    opacity: 0.65;
    transition: opacity 160ms ease, transform 160ms ease;
}

.language-switch-mobile {
    justify-self: center;
    margin: 8px 0 0;
}

.language-switch-mobile button {
    min-width: 44px;
    min-height: 44px;
}

.language-switch button:not(.is-active):hover,
.language-switch button:focus-visible {
    background: rgba(255, 255, 255, 0.08);
}

.language-switch button:hover .language-flag,
.language-switch button:focus-visible .language-flag,
.language-switch button.is-active .language-flag {
    opacity: 1;
}

.language-switch button:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

.lang-zh,
.lang-zh h1,
.lang-zh h2,
.lang-zh h3,
.lang-zh .header-nav,
.lang-zh .mobile-navigation,
.lang-zh .project-link,
.lang-zh .project-tags,
.lang-zh .project-status {
    font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", "Segoe UI", sans-serif;
}

.lang-zh p,
.lang-zh dd,
.lang-zh figcaption {
    overflow-wrap: anywhere;
}

.nav-toggle,
.mobile-navigation,
.mobile-scroll-header {
    display: none;
}

a {
    color: var(--text);
    text-underline-offset: 4px;
    transition: color 160ms ease, opacity 160ms ease;
}

a:hover {
    color: #fff;
}

a:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 4px;
}

.header-nav a,
.mobile-navigation a {
    display: block;
    padding: 9px 12px;
    color: #e2e3e0;
    border-radius: 999px;
    text-decoration: none;
    transition: color 180ms ease, background 180ms ease, transform 180ms ease, opacity 180ms ease;
}

.header-nav a:hover,
.mobile-navigation a:hover {
    color: var(--background);
    background: var(--text);
    transform: translateY(-2px);
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 56px 40px;
}

.project-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    background: var(--surface);
    border-radius: 4px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    transition: color 240ms ease, background 240ms ease, box-shadow 240ms ease, transform 240ms ease;
}

.project-card:hover {
    color: var(--background);
    background: var(--text);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.48);
    transform: translateY(-5px);
}

.project-card > a:first-child {
    position: relative;
    display: block;
    line-height: 0;
}

.project-tags {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    overflow: hidden;
    color: var(--background);
    background: var(--text);
    border: 1.5px solid var(--text);
    border-radius: 999px;
    font-family: "Syne", "Segoe UI", sans-serif;
    font-size: 0.84rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.01em;
    transition: color 240ms ease, background 240ms ease, border-color 240ms ease;
}

.project-role,
.project-engine {
    display: block;
    padding: 7px 10px;
    color: inherit;
    background: transparent;
}

.project-engine {
    padding-left: 0;
}

.project-engine::before {
    margin-right: 10px;
    content: "•";
}

.project-card:hover .project-tags {
    color: var(--text);
    background: var(--background);
    border-color: var(--background);
}

.project-card img,
.project-card video,
.project-hero {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #181a1d;
    border: 0;
    outline: 0;
    box-shadow: none;
    object-fit: cover;
}

.project-card img,
.project-card video {
    transition: filter 300ms ease, transform 400ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.project-card:hover img,
.project-card:hover video {
    filter: brightness(1.06) contrast(1.03);
    transform: scale(1.025);
}

.project-card h3 {
    margin: 18px 18px 8px;
    font-family: "Syne", "Segoe UI", sans-serif;
    font-size: clamp(1.45rem, 2.2vw, 1.75rem);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.035em;
    transition: color 240ms ease, transform 240ms ease;
}

.project-card:hover h3 {
    color: var(--background);
    transform: translateX(4px);
}

.project-card:hover p,
.project-card:hover .project-link {
    color: var(--background);
}

.project-card p {
    margin: 0 18px 12px;
}

.project-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: auto;
    padding: 0 18px 20px;
}

.project-link {
    position: relative;
    display: inline-block;
    align-self: flex-start;
    flex: 0 0 auto;
    margin: 0;
    font-weight: 700;
    text-decoration: none;
}

.project-link::after {
    position: absolute;
    right: 0;
    bottom: -1px;
    left: 0;
    height: 2px;
    background: currentColor;
    content: "";
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 240ms ease;
}

.project-link:hover::after,
.project-link:focus-visible::after {
    transform: scaleX(1);
}

.more-projects {
    margin-top: 48px;
    text-align: center;
}

.more-projects a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 24px;
    color: var(--text);
    border: 2px solid var(--text);
    border-radius: 999px;
    font-family: "Space Grotesk", "Segoe UI", sans-serif;
    font-size: 1.05rem;
    font-weight: 600;
    text-decoration: none;
    transition: color 180ms ease, background 180ms ease, transform 180ms ease;
}

.more-projects a:hover {
    color: var(--background);
    background: var(--text);
    transform: translateY(-3px);
}

.photo-instructions {
    position: absolute;
    right: 28px;
    bottom: 24px;
    z-index: 0;
    margin: 0;
    color: var(--text);
    font-family: "Space Grotesk", "Segoe UI", sans-serif;
    font-size: 1.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    pointer-events: none;
    transform: rotate(-7deg);
    transform-origin: right center;
}

.photo-playground {
    position: relative;
    min-height: 520px;
    overflow: hidden;
    border-radius: 4px;
    background: var(--background);
}

.movable-photo {
    position: absolute;
    margin: 0;
    padding: 2px;
    background: #e8e6df;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.55);
    cursor: grab;
    touch-action: none;
    user-select: none;
    transform-origin: center;
    transition: box-shadow 160ms ease;
}

.movable-photo:active {
    cursor: grabbing;
}

.movable-photo:hover,
.movable-photo:focus-visible {
    box-shadow: 0 24px 54px rgba(0, 0, 0, 0.72);
}

.movable-photo img {
    display: block;
    width: 100%;
    height: auto;
    image-rendering: auto;
    pointer-events: none;
}

.photo-one {
    top: 62px;
    left: 21%;
    width: min(22vw, 230px);
}

.photo-two {
    top: 78px;
    left: 43%;
    width: min(25vw, 260px);
}

.photo-three {
    top: 24px;
    left: 34%;
    width: min(21vw, 220px);
}

.photo-four {
    top: 206px;
    left: 18%;
    width: min(27vw, 280px);
}

.photo-five {
    top: 188px;
    left: 51%;
    width: min(27vw, 280px);
}

.photo-six {
    top: 116px;
    left: 8%;
    width: min(25vw, 260px);
}

.photo-seven {
    top: 136px;
    left: 66%;
    width: min(23vw, 240px);
}

.photo-eight {
    top: 34px;
    left: 58%;
    width: min(21vw, 220px);
}

.photo-nine {
    top: 215px;
    left: 37%;
    width: min(21vw, 220px);
}

.photo-rotate-handle {
    position: absolute;
    top: -12px;
    right: -12px;
    display: grid;
    width: 26px;
    height: 26px;
    place-items: center;
    color: var(--background);
    background: var(--text);
    border: 2px solid var(--background);
    border-radius: 50%;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1;
    cursor: alias;
}

.contact-footer {
    padding-top: 32px;
    border-top: 1px solid var(--line);
    text-align: center;
}

.contact-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 18px;
}

.contact-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    min-width: 156px;
    padding: 11px 22px;
    color: var(--text);
    border: 2px solid #d9dcda;
    border-radius: 999px;
    font-family: "Space Grotesk", "Segoe UI", sans-serif;
    font-size: 1.05rem;
    font-weight: 600;
    text-decoration: none;
    transition: color 180ms ease, background 180ms ease, transform 180ms ease;
}

.contact-links a:hover {
    color: var(--background);
    background: var(--text);
    transform: translateY(-3px);
}

.contact-links svg {
    width: 24px;
    height: 24px;
    overflow: visible;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
}

.contact-links a:nth-child(2) svg path {
    fill: currentColor;
    stroke: none;
}

.contact-links svg path,
.contact-links svg rect {
    vector-effect: non-scaling-stroke;
}

.contact-links svg .play-icon {
    fill: currentColor;
    stroke: none;
}

.back-to-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin: 0;
    padding: 0;
    color: var(--text);
    background: var(--background);
    border: 2px solid var(--text);
    border-radius: 50%;
    text-decoration: none;
    opacity: 1;
    transition: color 180ms ease, background 180ms ease, transform 180ms ease, opacity 180ms ease;
}

.back-to-top svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.back-to-top:hover {
    color: var(--background);
    background: var(--text);
    opacity: 1;
    transform: translateY(-2px);
}

.copyright {
    margin: 30px 0 0;
    color: #747876;
    font-size: 0.78rem;
    letter-spacing: 0.02em;
}

.project-page {
    max-width: 1100px;
}

.project-page main {
    max-width: 850px;
    margin: 56px auto 0;
}

.project-page section {
    margin-bottom: 40px;
}

.project-page main > h1,
.project-page main section > h2 {
    font-family: "Syne", "Segoe UI", sans-serif;
}

.project-title-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 30px;
}

.project-title-line.project-title-stacked {
    flex-direction: column;
    align-items: flex-start;
}

.project-title-line h1 {
    margin: 0;
    font-family: "Syne", "Segoe UI", sans-serif;
    font-size: clamp(2.6rem, 5.2vw, 4.2rem);
    font-weight: 600;
    letter-spacing: -0.035em;
    line-height: 1.05;
}

.project-title-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.project-status {
    display: inline-block;
    padding: 6px 10px;
    color: var(--background);
    background: var(--text);
    border-radius: 999px;
    font-family: "Space Grotesk", "Segoe UI", sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.04em;
    vertical-align: middle;
    text-transform: uppercase;
}

.case-study > .project-hero {
    margin-bottom: 64px;
}

.project-asset-credit {
  margin: 12px 0 48px;
    color: #8f9390;
    font-size: 0.78rem;
    line-height: 1.5;
    text-align: right;
}

.case-study > .project-hero.project-hero-with-credit {
  margin-bottom: 0;
}

.project-asset-credit strong {
    color: #c7cac8;
    font-weight: 700;
}

.vere-trailer {
    aspect-ratio: 16 / 9;
    height: auto;
    border: 0;
}

.case-study > .vere-trailer,
.case-study > .project-hero.project-hero-with-action {
    margin-bottom: 24px;
}

.project-play-action {
    margin-bottom: 48px;
    text-align: center;
}

.project-play-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 10px 28px;
    border: 2px solid var(--text);
    border-radius: 999px;
    color: var(--text);
    background: var(--background);
    font: 600 1.1rem/1.4 "Space Grotesk", "Microsoft YaHei", sans-serif;
    text-decoration: none;
    transition: color 180ms ease, background 180ms ease;
}

.project-play-button:hover,
.project-play-button:focus-visible {
    color: var(--background);
    background: var(--text);
    text-decoration: none;
}

.project-download-button {
    gap: 14px;
    padding-right: 10px;
}

.download-size {
    display: inline-flex;
    min-height: 30px;
    padding: 0 11px;
    align-items: center;
    border: 1px solid var(--text);
    border-radius: 999px;
    color: var(--background);
    background: var(--text);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1;
    transition: color 180ms ease, background 180ms ease, border-color 180ms ease;
}

.project-download-button:hover .download-size,
.project-download-button:focus-visible .download-size {
    color: var(--text);
    background: var(--background);
    border-color: var(--background);
}

#vere-overview > p,
#vere-level-design > p,
.case-study.boxy-case-study section > p {
    max-width: 100%;
}

.case-study section {
    margin-bottom: 72px;
    padding-top: 34px;
    border-top: 1px solid var(--line);
}

.case-study section > h2 {
    margin: 0 0 16px;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    line-height: 1.05;
}

.case-study section > p {
    max-width: 760px;
    margin: 0 0 28px;
    font-size: 1.03rem;
}

.recognition-showcase {
    margin: 46px 0 52px;
}

.recognition-showcase > .recognition-intro {
    max-width: 900px;
    margin: 0 0 20px;
    font-size: 1.03rem;
}

.recognition-carousel {
    position: relative;
}

.recognition-viewport {
    width: 100%;
    min-width: 0;
    overflow: hidden;
}

.recognition-slide {
    min-width: 0;
    margin: 0;
}

.recognition-slide[hidden] {
    display: none;
}

.recognition-slide.slide-in-from-right {
    animation: recognition-slide-from-right 320ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.recognition-slide.slide-in-from-left {
    animation: recognition-slide-from-left 320ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes recognition-slide-from-right {
    from {
        opacity: 0.35;
        transform: translateX(5%);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes recognition-slide-from-left {
    from {
        opacity: 0.35;
        transform: translateX(-5%);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.recognition-slide img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 2559 / 1439;
    object-fit: cover;
    background: var(--surface);
    border: 1px solid var(--line);
}

.recognition-slide figcaption {
    margin-top: 9px;
    color: var(--text);
    font-family: "Syne", "Microsoft YaHei", sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.recognition-arrow {
    position: absolute;
    top: 50%;
    z-index: 2;
    display: grid;
    width: 46px;
    height: 46px;
    padding: 0;
    place-items: center;
    color: #000;
    background: #fff;
    border: 1px solid #fff;
    border-radius: 50%;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
    cursor: pointer;
    font: 700 1.15rem/1 Arial, sans-serif;
    transform: translateY(-70%);
    transition: color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.recognition-arrow:hover,
.recognition-arrow:focus-visible {
    color: #fff;
    background: #000;
    transform: translateY(-70%) scale(1.06);
}

.recognition-arrow svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 3.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.recognition-prev {
    left: 14px;
}

.recognition-next {
    right: 14px;
}

.recognition-tabs {
    --recognition-position: 0;
    position: relative;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    width: 100%;
    margin-top: 18px;
    margin-right: auto;
    margin-left: auto;
    padding: 0;
    gap: 0;
    border: 1px solid var(--text);
    border-radius: 999px;
    overflow: hidden;
    isolation: isolate;
    touch-action: pan-y;
    user-select: none;
}

.recognition-tabs::before {
    content: "";
    position: absolute;
    z-index: 0;
    top: 0;
    bottom: 0;
    left: 0;
    width: calc(100% / 6);
    background: #fff;
    border-radius: 999px;
    transform: translateX(calc(var(--recognition-position) * 100%));
    transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
}

.recognition-tabs.is-dragging,
.recognition-tabs.is-dragging button {
    cursor: grabbing;
}

.recognition-tabs.is-dragging::before {
    transition: none;
}

.recognition-tabs button {
    position: relative;
    z-index: 1;
    min-width: 0;
    padding: 11px 8px;
    color: var(--text);
    background: transparent;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    font-family: "Syne", "Microsoft YaHei", sans-serif;
    font-size: 0.86rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    transition: color 160ms ease, background-color 160ms ease;
}

.recognition-tabs button.is-active {
    color: #000;
    background: transparent;
}

.recognition-tabs button:hover:not(.is-active) {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.recognition-tabs button:focus-visible {
    outline: 2px solid #fff;
    outline-offset: -2px;
}

.boss-case-study section > p {
    max-width: 100%;
}

.boss-case-study section > h2 {
    margin-bottom: 30px;
    font-size: clamp(2.15rem, 4.4vw, 3rem);
}

.boss-case-study .case-study-subheading {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 22px;
    color: var(--text);
    font-family: "Syne", "Microsoft YaHei", sans-serif;
    font-size: clamp(1.15rem, 2.4vw, 1.42rem);
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.25;
    text-transform: none;
}

.boss-case-study .case-study-subheading::before {
    color: #858987;
    content: "•";
    font-family: Arial, sans-serif;
    font-size: 0.72em;
}

.boss-flowchart-wrap {
    width: 100%;
    margin: 38px 0 12px;
    overflow-x: auto;
    background: var(--surface);
    border-radius: 4px;
    scrollbar-color: #575a58 var(--surface);
}

.boss-flowchart {
    display: block;
    width: 100%;
    min-width: 720px;
    height: auto;
    padding: 26px;
    box-sizing: border-box;
}

.boss-flowchart marker path {
    fill: #9a9d9b;
}

.flow-connectors path {
    fill: none;
    stroke: #9a9d9b;
    stroke-width: 2;
    marker-end: url(#flow-arrowhead);
}

.flow-connectors .flow-secondary-line {
    stroke: #606361;
    stroke-dasharray: 7 8;
}

.flow-connectors .flow-loop-line {
    stroke: #dedfdf;
}

.flow-connectors .flow-merge-line {
    marker-end: none;
}

.flow-start-node,
.flow-reassess-node {
    fill: var(--text);
    stroke: var(--text);
    stroke-width: 2;
}

.flow-process-node,
.flow-decision-node {
    fill: #0b0c0c;
    stroke: #dedfdf;
    stroke-width: 2;
}

.flow-node-text {
    fill: var(--text);
    font: 700 16px/1 "Manrope", "Microsoft YaHei", sans-serif;
    text-anchor: middle;
}

.flow-node-text-inverse {
    fill: var(--background);
    font-family: "Space Grotesk", "Microsoft YaHei", sans-serif;
    font-size: 15px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.flow-branch-label {
    fill: #b5b8b6;
    font: 700 14px/1 "Space Grotesk", "Microsoft YaHei", sans-serif;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.diagram-purpose {
    color: #858987;
    font-size: 0.82rem !important;
    line-height: 1.45;
    text-align: center;
}

.boss-moveset-heading {
    margin-top: 52px;
}

.character-loop-heading {
    margin-top: 52px;
}

.boss-move-grid {
    display: grid;
    gap: 18px;
    margin-top: 32px;
}

.boss-move-row {
    display: grid;
    grid-template-columns: minmax(0, 0.84fr) minmax(0, 1.16fr);
    gap: 0;
    align-items: stretch;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid #2d2f2e;
    border-radius: 4px;
}

.boss-move-row:nth-child(even) {
    grid-template-columns: minmax(0, 1.16fr) minmax(0, 0.84fr);
}

.boss-move-grid article {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 240px;
    padding: 24px;
    background: transparent;
    border: 0;
    border-radius: 0;
}

.boss-move-demo {
    display: flex;
    min-height: 240px;
    aspect-ratio: 16 / 9;
    align-items: center;
    justify-content: center;
    background: #0b0c0c;
    border: 0;
    border-radius: 0;
}

.boss-move-demo span {
    color: #777b78;
    font: 700 0.72rem/1 "Space Grotesk", "Microsoft YaHei", sans-serif;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.boss-move-video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-style: solid;
}

.boss-move-row:nth-child(even) article {
    grid-column: 2;
    grid-row: 1;
}

.boss-move-row:nth-child(even) .boss-move-demo {
    grid-column: 1;
    grid-row: 1;
}

.boss-move-grid article > span {
    display: block;
    margin-bottom: 12px;
    color: #858987;
    font: 700 0.68rem/1.25 "Space Grotesk", "Microsoft YaHei", sans-serif;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.boss-move-grid h3 {
    margin: 0 0 10px;
    color: var(--text);
    font-family: "Syne", "Microsoft YaHei", sans-serif;
    font-size: 1.25rem;
}

.boss-move-grid p {
    margin: 0;
    font-size: 0.94rem;
    line-height: 1.55;
}

.combat-loop {
    display: grid;
    grid-template-columns: repeat(7, auto);
    gap: 10px;
    align-items: center;
    margin-top: 38px;
}

.combat-loop > div {
    min-height: 112px;
    padding: 17px 14px;
    background: var(--surface);
    border-top: 2px solid var(--text);
}

.combat-loop > div > span {
    display: block;
    margin-bottom: 14px;
    color: #858987;
    font: 700 0.68rem/1 "Space Grotesk", "Segoe UI", sans-serif;
    letter-spacing: 0.08em;
}

.combat-loop strong {
    color: var(--text);
    font-family: "Manrope", "Microsoft YaHei", sans-serif;
    font-size: 0.86rem;
    line-height: 1.35;
}

.combat-loop-arrow {
    color: #858987;
    font-size: 1.15rem;
}

.case-study section.case-study-continuation {
    margin-top: -32px;
    padding-top: 0;
    border-top: 0;
}

.case-study section.case-study-continuation > p {
    max-width: 100%;
}

.case-study section > .classification-key-point {
    color: var(--text);
    font-family: "Manrope", "Segoe UI", sans-serif;
    font-size: 1.13rem;
    line-height: 1.58;
}

.classification-key-point strong {
    font-weight: 700;
}

.case-study-subheading {
    margin: 0 0 16px;
    color: var(--text);
    font-family: "Syne", "Segoe UI", sans-serif;
    font-size: clamp(1.4rem, 3vw, 1.9rem);
    line-height: 1.1;
}

.source-figure {
    width: 100%;
    max-width: 100%;
    margin: 34px auto 42px;
    overflow: hidden;
}

.source-figure img {
    display: block;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    height: auto;
    padding: 12px;
    background: #fff;
    border-radius: 4px;
}

.source-figure-family {
    max-width: 850px;
}

.source-figure-family-flow {
    max-width: 850px;
}

.source-figure-sword-flow {
    max-width: 850px;
}

.source-figure-whip-flow {
    max-width: 850px;
}

.source-figure-split {
    display: grid;
    grid-template-columns: minmax(240px, 0.85fr) minmax(260px, 1.15fr);
    gap: clamp(28px, 5vw, 52px);
    align-items: center;
}

.source-figure-split img {
    padding: 10px;
}

.source-figure.source-figure-split figcaption {
    margin-top: 0;
    color: var(--muted);
    font-family: "Manrope", "Segoe UI", sans-serif;
    font-size: 1rem;
    font-weight: 300;
    line-height: 1.6;
    text-align: left;
}

.source-figure.source-figure-split figcaption strong {
    display: block;
    margin-bottom: 12px;
    color: var(--text);
    font-family: "Manrope", "Segoe UI", sans-serif;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.6;
}

.source-figure-split figcaption p {
    margin: 0;
}

.source-figure-split figcaption p + p {
    margin-top: 14px;
}

.source-figure.source-figure-split figcaption .diagram-purpose {
    margin-top: 20px;
    color: #858987;
    font-size: 0.82rem;
    line-height: 1.45;
}

.source-figure-split-reverse img {
    grid-column: 2;
    grid-row: 1;
}

.source-figure-split-reverse figcaption {
    grid-column: 1;
    grid-row: 1;
}

.source-figure figcaption {
    margin-top: 11px;
    color: #858987;
    font-size: 0.82rem;
    line-height: 1.45;
    text-align: center;
}

.combat-role-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 28px;
    margin: 8px 0 0;
}

.combat-role-list > div {
    padding: 18px 0;
    border-top: 1px solid var(--line);
}

.combat-role-list dt {
    margin-bottom: 7px;
    color: var(--text);
    font-family: "Syne", "Segoe UI", sans-serif;
    font-size: 1rem;
    font-weight: 700;
}

.combat-role-list dt span {
    display: block;
    margin-top: 2px;
    color: #858987;
    font-family: "Space Grotesk", "Segoe UI", sans-serif;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.combat-role-list dd {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.55;
}

.advantage-matrix {
    min-width: 980px;
}

.advantage-matrix caption {
    padding: 16px;
    color: var(--text);
    background: #0d0f11;
    border-bottom: 1px solid var(--line);
    font-family: "Syne", "Segoe UI", sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    text-align: left;
}

.advantage-matrix th,
.advantage-matrix td {
    min-width: 82px;
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
}

.advantage-matrix th:first-child,
.advantage-matrix td:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    min-width: 100px;
}

.advantage-matrix td:first-child {
    background: #111315;
}

.game-overview > p + p {
    margin-top: -12px;
}

.case-study .game-overview > p {
    max-width: 100%;
}

.game-name-intro {
    color: var(--text);
    font-family: "Syne", "Segoe UI", sans-serif;
    font-size: 1.35em;
    font-weight: 600;
    letter-spacing: -0.025em;
}

.contribution-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
}

.contribution-grid article {
    padding-top: 14px;
    border-top: 2px solid var(--text);
}

.contribution-number,
.weapon-family-grid article > span {
    color: #747876;
    font-family: "Space Grotesk", "Segoe UI", sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.contribution-grid h3,
.weapon-family-grid h3 {
    margin: 10px 0 8px;
    font-family: "Syne", "Segoe UI", sans-serif;
    font-size: 1.12rem;
}

.contribution-grid p,
.weapon-family-grid p {
    margin: 0;
    font-size: 0.94rem;
    line-height: 1.55;
}

.system-flow {
    display: grid;
    grid-template-columns: 1fr auto 1.35fr auto 1fr;
    align-items: center;
    gap: 14px;
    margin: 34px 0;
}

.flow-node {
    min-height: 92px;
    padding: 18px;
    color: var(--text);
    border: 1.5px solid var(--text);
    border-radius: 4px;
    font-family: "Space Grotesk", "Segoe UI", sans-serif;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
}

.flow-node small {
    display: block;
    margin-top: 7px;
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 500;
}

.flow-start,
.flow-result {
    color: var(--background);
    background: var(--text);
}

.flow-arrow {
    color: var(--text);
    font-size: 1.65rem;
}

.weapon-family-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.weapon-family-grid article {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 4px;
}

.decision-diagram {
    display: grid;
    gap: 12px;
    max-width: 720px;
    margin: 32px auto 0;
}

.decision-start {
    justify-self: center;
    padding: 12px 22px;
    color: var(--background);
    background: var(--text);
    border-radius: 999px;
    font-family: "Space Grotesk", "Segoe UI", sans-serif;
    font-weight: 700;
}

.decision-step {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 12px;
    padding: 18px;
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 4px;
}

.decision-step strong {
    font-family: "Space Grotesk", "Segoe UI", sans-serif;
}

.decision-yes,
.decision-no {
    padding: 7px 10px;
    color: var(--background);
    background: var(--text);
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
    white-space: nowrap;
}

.table-scroll {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 4px;
}

.table-scroll:focus-visible {
    outline: 2px solid var(--text);
    outline-offset: 4px;
}

.case-study-table {
    width: 100%;
    min-width: 680px;
    border-collapse: collapse;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.45;
}

.case-study-table th,
.case-study-table td {
    padding: 14px 16px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.case-study-table th:last-child,
.case-study-table td:last-child {
    border-right: 0;
}

.case-study-table tbody tr:last-child td {
    border-bottom: 0;
}

.case-study-table th {
    color: var(--background);
    background: var(--text);
    font-family: "Space Grotesk", "Segoe UI", sans-serif;
    font-weight: 700;
}

.case-study-table tbody tr:nth-child(even) {
    background: #0d0f11;
}

.case-study-table td:first-child {
    color: var(--text);
    font-weight: 700;
}

.role-table th:first-child,
.role-table td:first-child {
    width: 16%;
}

.counter-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 18px;
}

.counter-legend span {
    padding: 7px 11px;
    color: var(--background);
    background: var(--text);
    border-radius: 999px;
    font-size: 0.8rem;
}

.counter-legend strong {
    margin-right: 4px;
}

.resume-content {
    margin: 56px 0 72px;
}

.resume-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}

.resume-heading h1 {
    margin: 0;
    font-size: clamp(2.5rem, 5vw, 4rem);
    line-height: 1;
}

.resume-viewer {
    display: block;
    width: 100%;
    height: min(78vh, 1050px);
    min-height: 720px;
    background: #fff;
    border: 0;
    border-radius: 4px;
}

.resume-fallback {
    padding: 32px;
    color: #111;
    background: #fff;
}

.contact-content {
    max-width: 780px;
    margin: 56px auto 88px;
}

.contact-heading {
    margin-bottom: 36px;
}

.contact-heading h1 {
    margin: 0 0 14px;
    font-size: clamp(2.7rem, 6vw, 4.6rem);
    line-height: 1;
}

.contact-heading p {
    max-width: 620px;
    margin: 0;
    font-family: "Manrope", "Segoe UI", sans-serif;
    font-size: 1.08rem;
    font-weight: 300;
}

.contact-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.contact-field {
    display: grid;
    gap: 8px;
    color: var(--text);
    font-family: "Space Grotesk", "Segoe UI", sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
}

.contact-field-wide {
    grid-column: 1 / -1;
}

.contact-field input,
.contact-field textarea {
    width: 100%;
    padding: 13px 14px;
    color: var(--text);
    background: var(--surface);
    border: 1px solid #414549;
    border-radius: 4px;
    font: 400 1rem/1.5 "Manrope", "Segoe UI", sans-serif;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.contact-field textarea {
    min-height: 190px;
    resize: vertical;
}

.contact-field input:focus,
.contact-field textarea:focus {
    border-color: #fff;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.14);
    outline: 0;
}

.contact-submit-row {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 18px;
}

.contact-submit-row button {
    padding: 12px 20px;
    color: var(--background);
    background: var(--text);
    border: 2px solid var(--text);
    border-radius: 999px;
    font-family: "Space Grotesk", "Segoe UI", sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: color 180ms ease, background 180ms ease, opacity 180ms ease;
}

.contact-submit-row button:hover,
.contact-submit-row button:focus-visible {
    color: var(--text);
    background: var(--background);
}

.contact-submit-row button:disabled {
    cursor: wait;
    opacity: 0.6;
}

.contact-status {
    min-height: 1.5em;
    margin: 0;
    font-family: "Manrope", "Segoe UI", sans-serif;
    font-size: 0.92rem;
}

.contact-status.is-success {
    color: #b9efc6;
}

.contact-status.is-error {
    color: #ffaaa3;
}

.form-honey {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

@media (min-width: 701px) {
    body {
        zoom: 1.1;
    }

    .header-layout {
        flex-wrap: nowrap;
        justify-content: flex-start;
    }

    .header-layout > .site-logo {
        order: 1;
        flex: 0 1 auto;
    }

    .header-nav {
        align-self: flex-end;
        margin-top: 0;
        transform: translateY(8px);
    }

    .header-nav-left {
        order: 2;
        margin-right: 5px;
        margin-left: auto;
    }

    .header-nav-right {
        order: 3;
        margin-left: 5px;
    }

    .mobile-scroll-header {
        position: fixed;
        top: 0;
        right: 0;
        left: 0;
        z-index: 50;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        column-gap: 28px;
        align-items: center;
        padding: 32px max(24px, calc((100vw - 1100px) / 2)) 20px;
        background: rgba(8, 9, 10, 0.97);
        border-bottom: 1px solid var(--line);
        box-shadow: 0 10px 28px rgba(0, 0, 0, 0.38);
        pointer-events: none;
        transform: translateY(-110%);
        transition: transform 240ms cubic-bezier(0.2, 0.7, 0.2, 1);
        backdrop-filter: blur(12px);
    }

    .mobile-scroll-header.is-visible {
        pointer-events: auto;
        transform: translateY(0);
    }

    .mobile-scroll-header .site-logo {
        grid-column: 1;
        grid-row: 1;
        width: max-content;
        gap: 18px;
        justify-content: flex-start;
        font-size: clamp(3rem, 5vw, 4rem);
    }

    .mobile-scroll-header .brand-mark {
        width: 92px;
        height: 92px;
    }

    .mobile-scroll-header .brand-copy {
        min-height: 92px;
        gap: 5px;
    }

    .mobile-scroll-header .tagline {
        font-size: 1rem;
    }

    .mobile-scroll-header .nav-toggle {
        display: none;
    }

    .mobile-scroll-header .mobile-navigation {
        grid-column: 2;
        grid-row: 1;
        display: flex;
        width: auto;
        margin: 0;
        gap: 10px;
        align-self: end;
        transform: translateY(8px);
    }
}

@media (max-width: 700px) {
    body {
        padding: 24px 18px;
    }

    #about {
        scroll-margin-top: 56px;
    }

    .about-content {
        grid-template-columns: minmax(0, 1fr);
        align-items: start;
    }

    .about-portrait {
        display: none;
    }

    .about-extra {
        display: none;
    }

    .about-extra.is-expanded {
        display: block;
    }

    .about-more-toggle {
        display: inline-flex;
        margin-top: 18px;
        padding: 8px 12px;
        color: var(--background);
        background: #fff;
        border: 2px solid #fff;
        border-radius: 999px;
        font-family: "Space Grotesk", "Segoe UI", sans-serif;
        font-size: 1rem;
        font-weight: 600;
        cursor: pointer;
        transition: opacity 180ms ease;
    }

    .about-more-toggle:hover,
    .about-more-toggle:focus-visible {
        color: var(--background);
        background: #fff;
    }

    .about-more-toggle:focus-visible {
        outline: 2px solid #fff;
        outline-offset: 3px;
    }

    .project-grid {
        grid-template-columns: 1fr;
        gap: 44px;
    }

    .resume-content {
        margin-top: 40px;
    }

    .resume-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .resume-viewer {
        height: 72vh;
        min-height: 560px;
    }

    .contact-content {
        margin-top: 40px;
        margin-bottom: 64px;
    }

    .contact-form {
        grid-template-columns: 1fr;
    }

    .contact-field-wide,
    .contact-submit-row {
        grid-column: 1;
    }

    .contact-submit-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .contact-submit-row button,
    .contact-submit-row button:hover,
    .contact-submit-row button:focus-visible {
        color: var(--background);
        background: #fff;
        border-color: #fff;
    }

    .photo-playground {
        min-height: 410px;
    }

    .photo-instructions {
        right: 16px;
        bottom: 16px;
        font-size: 1.2rem;
    }

    .photo-one {
        top: 78px;
        left: 20%;
        width: min(48vw, 210px);
    }

    .photo-two {
        top: 92px;
        left: 27%;
        width: min(50vw, 220px);
    }

    .photo-three {
        top: 72px;
        left: 24%;
        width: min(48vw, 210px);
    }

    .photo-four {
        top: 122px;
        left: 18%;
        width: min(52vw, 230px);
    }

    .photo-five {
        top: 132px;
        left: 28%;
        width: min(52vw, 230px);
    }

    .photo-six {
        top: 108px;
        left: 20%;
        width: min(50vw, 220px);
    }

    .photo-seven {
        top: 118px;
        left: 30%;
        width: min(48vw, 210px);
    }

    .photo-eight {
        top: 60px;
        left: 27%;
        width: min(46vw, 200px);
    }

    .photo-nine {
        top: 128px;
        left: 23%;
        width: min(46vw, 200px);
    }

    .site-logo {
        order: 1;
        width: max-content;
        max-width: 100%;
        gap: 12px;
        justify-content: flex-start;
        font-size: 2.15rem;
    }

    .brand-mark {
        width: 68px;
        height: 68px;
    }

    .brand-copy {
        min-height: 68px;
        gap: 3px;
    }

    .tagline {
        font-size: 0.86rem;
    }

    .site-header {
        margin-bottom: 56px;
        padding: 24px 0 18px;
    }

    .header-layout {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 42px;
        column-gap: 12px;
        align-items: center;
    }

    .header-nav {
        display: none;
    }

    .nav-toggle {
        position: static;
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
        z-index: 2;
        display: flex;
        width: 42px;
        height: 42px;
        padding: 9px;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        color: var(--text);
        background: transparent;
        border: 0;
        border-radius: 4px;
        cursor: pointer;
    }

    .nav-toggle span {
        display: block;
        width: 100%;
        height: 2px;
        background: currentColor;
        transition: transform 180ms ease, opacity 180ms ease;
    }

    .nav-toggle[aria-expanded="true"] span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .nav-toggle[aria-expanded="true"] span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle[aria-expanded="true"] span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .mobile-navigation {
        grid-column: 1 / -1;
        grid-row: 2;
        justify-self: center;
        display: grid;
        width: min(100%, 280px);
        margin: 18px auto 0;
        gap: 8px;
    }

    .mobile-navigation[hidden] {
        display: none;
    }

    .mobile-scroll-header {
        position: fixed;
        top: 0;
        right: 0;
        left: 0;
        z-index: 50;
        display: grid;
        grid-template-columns: minmax(0, 1fr) 42px;
        column-gap: 12px;
        align-items: center;
        padding: 24px 18px 18px;
        background: rgba(8, 9, 10, 0.96);
        border-bottom: 1px solid var(--line);
        box-shadow: 0 10px 28px rgba(0, 0, 0, 0.38);
        pointer-events: none;
        transform: translateY(-110%);
        transition: transform 240ms cubic-bezier(0.2, 0.7, 0.2, 1);
        backdrop-filter: blur(12px);
    }

    .mobile-scroll-header.is-visible {
        pointer-events: auto;
        transform: translateY(0);
    }

    .mobile-scroll-header .site-logo {
        grid-column: 1;
        grid-row: 1;
        gap: 12px;
        font-size: 2.15rem;
    }

    .mobile-scroll-header .brand-mark {
        width: 68px;
        height: 68px;
    }

    .mobile-scroll-header .brand-copy {
        min-height: 68px;
        gap: 3px;
    }

    .mobile-scroll-header .tagline {
        font-size: 0.86rem;
    }

    .mobile-scroll-header .nav-toggle {
        grid-column: 2;
        grid-row: 1;
    }

    .mobile-scroll-header .mobile-navigation {
        grid-column: 1 / -1;
        grid-row: 2;
        justify-self: center;
        margin-top: 10px;
    }

    .contact-links {
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 14px;
    }

    .contact-links a {
        width: 50px;
        height: 50px;
        min-width: 0;
        padding: 0;
        border-radius: 50%;
    }

    .contact-links a span {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        clip-path: inset(50%);
        white-space: nowrap;
    }

    .case-study > .project-hero {
        margin-bottom: 52px;
    }

    .case-study {
        width: 100%;
        min-width: 0;
    }

    .project-title-line {
        align-items: flex-start;
    }

    .case-study section {
        margin-bottom: 56px;
        padding-top: 28px;
    }

    .recognition-showcase {
        margin: 38px 0 44px;
    }

    .recognition-carousel {
        padding-bottom: 0;
    }

    .recognition-arrow {
        display: none;
    }

    .recognition-tabs {
        grid-template-columns: repeat(6, minmax(0, 1fr));
        width: 100%;
        gap: 0;
        padding: 0;
    }

    .recognition-tabs button {
        min-width: 0;
        padding: 10px 2px;
        font-size: clamp(0.6rem, 2.8vw, 0.72rem);
        letter-spacing: 0;
        white-space: nowrap;
    }

    .recognition-tabs button:nth-child(5) {
        font-size: clamp(0.55rem, 2.45vw, 0.68rem);
        letter-spacing: -0.02em;
    }

    .boss-flowchart-wrap {
        margin-top: 28px;
        overflow-x: hidden;
    }

    .boss-flowchart {
        width: 100%;
        min-width: 0;
        padding: 8px;
    }

    .boss-move-grid,
    .boss-move-row,
    .boss-move-row:nth-child(even) {
        grid-template-columns: 1fr;
    }

    .boss-move-grid article,
    .boss-move-row:nth-child(even) article {
        grid-column: 1;
        grid-row: 1;
        min-height: 0;
        padding: 17px;
    }

    .boss-move-row .boss-move-demo,
    .boss-move-row:nth-child(even) .boss-move-demo {
        grid-column: 1;
        grid-row: 2;
        min-height: 0;
    }

    .boss-move-row .boss-move-video,
    .boss-move-row:nth-child(even) .boss-move-video {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
        object-fit: contain;
    }

    .boss-moveset-heading {
        margin-top: 42px;
    }

    .character-loop-heading {
        margin-top: 42px;
    }

    .combat-loop {
        grid-template-columns: 1fr;
        max-width: 430px;
        margin-right: auto;
        margin-left: auto;
    }

    .combat-loop > div {
        min-height: 0;
    }

    .combat-loop-arrow {
        justify-self: center;
        transform: rotate(90deg);
    }

    .contribution-grid,
    .weapon-family-grid {
        grid-template-columns: 1fr;
    }

    .combat-role-list {
        grid-template-columns: 1fr;
    }

    .source-figure {
        width: min(100%, calc(100vw - 40px));
        margin-top: 26px;
        margin-bottom: 34px;
    }

    .source-figure img {
        padding: 6px;
    }

    .source-figure-family-flow {
        width: min(100%, 430px);
    }

    .source-figure-whip-flow {
        width: min(100%, 410px);
    }

    .source-figure-split {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .source-figure-split img,
    .source-figure-split-reverse img,
    .source-figure-split figcaption,
    .source-figure-split-reverse figcaption {
        grid-column: 1;
        grid-row: auto;
    }

    .source-figure-split img {
        width: min(82%, 330px);
        margin: 0 auto;
    }

    .source-figure-split figcaption {
        font-size: 0.9rem;
    }

    .case-study section.case-study-continuation {
        margin-top: -20px;
    }

    .system-flow {
        grid-template-columns: 1fr;
        max-width: 420px;
        margin-right: auto;
        margin-left: auto;
    }

    .flow-arrow {
        justify-self: center;
        line-height: 1;
        transform: rotate(90deg);
    }

    .decision-step {
        grid-template-columns: 1fr;
        justify-items: start;
    }

    .back-to-top {
        right: 16px;
        bottom: 16px;
        width: 50px;
        height: 50px;
        color: #000;
        background: #fff;
        border-color: #fff;
    }

    .back-to-top:hover,
    .back-to-top:focus-visible,
    .back-to-top:active {
        color: #000;
        background: #fff;
        border-color: #fff;
    }
}

@media (max-width: 520px) {
    .project-card-footer {
        flex-wrap: wrap;
        gap: 8px;
    }

    .project-tags {
        margin-left: auto;
        font-size: 0.76rem;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .about-portrait {
        width: min(100%, 260px);
        justify-self: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}
