/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --site-max-width: 1440px;
    --site-gutter: 32px; /* Titan rails + chrome */
    --content-inset: 64px; /* 32px breathing room inside the rails */
    --nav-pill-gap: 8px; /* air between rail inner edge and opaque pill */
    --nav-pill-inset: calc(var(--site-gutter) + var(--nav-pill-gap));
    --hairline: #e6e6e6;
    --canvas: #f2f2f7;
    --module-bg: #ffffff;
    --module-bg-soft: #ececef;
    --module-bg-muted: #e5e5ea;
    --text: #1c1c1e;
    --text-muted: #525252;
    --module-radius: 26px;
    --module-gap: 12px;
    --module-pad: 20px;
    /* Titan --io5: morph rest ↔ pill. Slide uses a start-now ease so reveal isn't delayed. */
    --nav-ease-morph: cubic-bezier(0.83, 0, 0.17, 1);
    --nav-ease-slide: cubic-bezier(0.22, 1, 0.36, 1);
    --nav-duration: 0.3s;
    --page-bound-right: calc((100vw - min(100vw, var(--site-max-width))) / 2 + var(--content-inset));
    --page-bound-bottom: max(24px, env(safe-area-inset-bottom, 0px));
    /* Shared right edge for side-rail, scroll-up, and AyoLLM */
    --side-rail-right: var(--site-gutter);
}

body.work-page {
    --site-max-width: 1200px;
}

/* Import Playfair Display font */
@import url('https://fonts.googleapis.com/css2?family=Mercury+Display:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&display=swap');

/* Boost productivity text styling */
.boost-productivity {
    font-family: 'Mercury Display', serif;
    font-style: italic;
    font-weight: 500;
    letter-spacing: 0.02em;
}

/* Homepage — page scrolls from hero into work */
html:has(body.home-page) {
    height: auto;
    overflow-x: hidden;
    overflow-y: auto;
}

/* Dot-grid wallpaper */
html {
    background-color: #ffffff;
    overflow-x: hidden;
}

body {
    position: relative;
    background-color: transparent;
    min-height: 100vh;
    min-height: 100dvh;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    min-height: 100%;
    z-index: 0;
    margin: 0;
    padding: 0;
    border: 0;
    pointer-events: none;
    background-color: #ffffff;
    background-image:
        radial-gradient(ellipse 120% 85% at 50% -5%, rgba(0, 0, 0, 0.04) 0%, transparent 52%),
        radial-gradient(circle, rgba(0, 0, 0, 0.12) 1.25px, transparent 1.25px);
    background-repeat: no-repeat, repeat;
    background-size: 100% 100%, 26px 26px;
    background-position: center top, 0 0;
}

/* Case study pages — plain white, no dot-grid wallpaper */
body.case-study-page,
html:has(body.case-study-page) {
    background-color: #ffffff;
}

/* Keep horizontal bleed clipped without breaking position:sticky Contents.
   overflow-x: hidden on html/body makes sticky TOC scroll away.
   Avoid nested :has() — unsupported in some Chromium builds. */
html:has(.case-study--swp) {
    overflow-x: clip;
}

body.case-study-page:has(.case-study--swp) {
    overflow-x: clip;
    overflow-y: visible;
}

/* About — match homepage canvas */
body.about-page,
html:has(body.about-page) {
    background-color: #fafafa;
}

/* Homepage — light bento (canvas + opaque white modules) */
body.home-page,
html:has(body.home-page) {
    background-color: #fafafa;
}

body.home-page {
    --hb-bg: #fafafa;
    --hb-card: #ffffff;
    --hb-card-elevated: #ffffff;
    --hb-border: var(--hairline);
    --hb-text: #1c1c1e;
    --hb-muted: #525252;
    --hb-accent: #1c1c1e;
    --hb-accent-ink: #ffffff;
    --hb-radius: 24px;
    --hb-gap: 16px;
    --hb-font: system-ui, Avenir, Helvetica, Arial, sans-serif;
    color: var(--hb-text);
}

body.home-page::before,
body.about-page::before,
body.case-study-page::before {
    content: none;
    display: none;
}

body > .header {
    z-index: 1000;
    pointer-events: auto;
}

body > .main,
body > .footer {
    position: relative;
    z-index: 1;
    background: transparent;
}

body .footer {
    background: transparent;
}

body.home-page {
    --header-offset: 52px; /* navbar-equivalent top inset after logo header removal */
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
    height: auto;
    max-height: none;
    overflow: visible;
    overscroll-behavior: auto;
}

/* Titan-like side rails: two 1px vertical rules, inset on a 1440 canvas — not a closed box.
   Sit above the header wash (header is a stacking context because of transform)
   so the lines continue through the nav. Clicks pass through. */
.page-guide,
.page-guide__line {
    display: none !important;
}

.page-guide {
    position: fixed;
    inset: 0;
    z-index: 1001;
    justify-content: space-between;
    align-items: stretch;
    width: 100%;
    max-width: var(--site-max-width);
    margin: 0 auto;
    padding: 0 var(--site-gutter);
    pointer-events: none;
}

.page-guide__line {
    width: 1px;
    height: 100%;
    background: #ececec;
    pointer-events: none;
}

/* Vertical crop rails stay on at every width — including Portfolio Studio
   previews, which are often < 991px and used to hide these. Horizontal
   bounds are intentionally omitted (not a closed frame). */
@media (max-width: 991px) {
    .page-guide__line {
        background: #dadada;
    }

    /* Keep page chrome inside the rails. 100vw / flush padding was
       crossing the 1px guides on tablet and playground widths. */
    .case-study {
        padding-left: var(--content-inset);
        padding-right: var(--content-inset);
        box-sizing: border-box;
        width: 100%;
        max-width: min(800px, 100%);
    }

    .case-study__hero-banner {
        width: 100%;
        max-width: 100%;
        left: auto;
        right: auto;
        margin-left: 0;
        margin-right: 0;
    }

    .hero,
    .projects,
    .about-story,
    .about-bio,
    .about-content,
    .case-study,
    .footer__content,
    .header__inner {
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
    }

    .case-study img,
    .case-study figure,
    .case-study video,
    .projects img,
    .project-card {
        max-width: 100%;
    }
}

body.home-page > .main,
body.about-page > .main {
    flex: 1 0 auto;
    min-height: 0;
    margin-top: 0;
    overflow: visible;
    display: flex;
    flex-direction: column;
}

body.home-page > .footer {
    flex-shrink: 0;
    margin-top: 0;
    padding: 0 0 28px;
    background: transparent;
}

.home-lines {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.home-lines__svg {
    display: block;
    width: 100%;
    min-height: 100%;
    height: 100%;
}

.hero__nowrap {
    white-space: nowrap;
}

.hero__craft-emoji {
    font-style: normal;
    -webkit-text-fill-color: initial;
}

.hero__craft {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    vertical-align: baseline;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* 🛠️ stands in for the word “fixes” */
.hero__fix {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: -0.12em;
    white-space: nowrap;
}

.hero__tools {
    display: block;
    font-style: normal;
    font-weight: 400;
    font-size: 0.88em;
    line-height: 1;
    -webkit-text-fill-color: initial;
    transform-origin: 32% 78%;
    animation: hero-tools-tap 3.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes hero-tools-tap {
    0%, 70%, 100% {
        transform: rotate(0deg);
    }
    76% {
        transform: rotate(-11deg);
    }
    83% {
        transform: rotate(7deg);
    }
    89% {
        transform: rotate(-3deg);
    }
    95% {
        transform: rotate(0deg);
    }
}

/* Crackle glaze inside “broken” — hairline veins clipped by the letter ink */
.hero__broken {
    position: relative;
    display: inline-block;
    vertical-align: baseline;
}

.hero__crackle {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    pointer-events: none;
}

.hero__crackle-vein {
    fill: none;
    stroke: #fff;
    stroke-width: 1.35;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: hero-crackle-draw 0.42s cubic-bezier(0.22, 1, 0.36, 1) 0.12s forwards;
}

@keyframes hero-crackle-draw {
    to {
        stroke-dashoffset: 0;
    }
}

/* Mountain emoji beside “workflows” */
.hero__mountain {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: -0.12em;
    margin-left: 0.14em;
    font-style: normal;
    font-weight: 400;
    font-size: 0.88em;
    line-height: 1;
    -webkit-text-fill-color: initial;
    pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
    .hero__tools {
        animation: none;
    }

    .hero__crackle-vein {
        animation: none;
        stroke-dashoffset: 0;
    }
}

/* Hero emphasis styling */
.hero__emphasis {
    font-family: 'Mercury Display', serif;
    font-weight: 700;
    font-style: italic;
    color: #6B46C1;
    position: relative;
    letter-spacing: -0.02em;
}

/* “Ayo” — inline listen + meaning controls */
.hero__ayo {
    position: relative;
    display: inline;
    font-style: inherit;
}

.hero__ayo-inline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    vertical-align: baseline;
}

.hero__ayo-name {
    font: inherit;
    color: inherit;
    letter-spacing: inherit;
}

.hero__ayo-tools {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    font-style: normal;
    font-weight: 500;
    letter-spacing: normal;
}

.hero__ayo-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid rgba(170, 178, 190, 0.4);
    background: #fff;
    color: #4a5568;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.hero__ayo-btn--listen {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #f0f2f5;
    border-color: transparent;
}

.hero__ayo-btn--listen:hover {
    background: #e8ecf0;
    color: #2d3748;
}

.hero__ayo-btn--listen.is-playing {
    color: #6b46c1;
    background: rgba(107, 70, 193, 0.12);
}

.hero__ayo-btn-icon {
    display: block;
}

.hero__ayo-btn--meaning {
    padding: 5px 10px;
    font-size: 0.72rem;
    line-height: 1.2;
    border-radius: 999px;
    white-space: nowrap;
}

.hero__ayo-btn--meaning:hover {
    color: #6b46c1;
    border-color: rgba(107, 70, 193, 0.35);
    background: rgba(107, 70, 193, 0.06);
}

.hero__ayo-btn--meaning[aria-expanded="true"] {
    color: #6b46c1;
    border-color: rgba(107, 70, 193, 0.45);
    background: rgba(107, 70, 193, 0.1);
}

.hero__ayo-btn:focus-visible {
    outline: 2px solid rgba(107, 70, 193, 0.5);
    outline-offset: 2px;
}

.hero-ayo-pop {
    position: absolute;
    left: 50%;
    top: calc(100% + 10px);
    transform: translateX(-50%);
    z-index: 35;
    pointer-events: auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    font-style: normal;
    font-weight: 400;
    letter-spacing: normal;
    text-align: left;
}

.hero-ayo-pop[hidden] {
    display: none;
}

.hero-ayo-pop__card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    box-sizing: border-box;
    width: min(280px, 78vw);
    padding: 12px 14px 13px;
    background: #fff;
    border: 1px solid rgba(170, 178, 190, 0.28);
    border-radius: 10px;
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.04),
        0 8px 24px rgba(0, 0, 0, 0.08);
    animation: hero-ayo-pop-in 0.32s cubic-bezier(0.22, 1.15, 0.36, 1);
}

@keyframes hero-ayo-pop-in {
    from {
        opacity: 0;
        transform: translateY(-6px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.hero-ayo-pop__head {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hero-ayo-pop__word {
    font-family: 'Mercury Display', Georgia, 'Times New Roman', serif;
    font-size: 1.35rem;
    font-weight: 700;
    font-style: italic;
    color: #1a1a1a;
    line-height: 1.1;
}

.hero-ayo-pop__flag {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    border-radius: 2px;
    overflow: hidden;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.hero-ayo-pop__flag-svg {
    display: block;
}

.hero-ayo-pop__pronounce {
    display: flex;
    align-items: center;
    gap: 6px;
}

.hero-ayo-pop__ipa {
    font-size: 0.95rem;
    color: #c45c26;
    font-family: 'Mercury Display', Georgia, 'Times New Roman', serif;
    font-style: italic;
    letter-spacing: 0.02em;
}

.hero-ayo-pop__meta {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #8a94a3;
}

.hero-ayo-pop__orth {
    text-transform: none;
    font-weight: 500;
    letter-spacing: 0;
    color: #6b7280;
}

.hero-ayo-pop__def {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.45;
    color: #3d4450;
}

.hero-ayo-pop__def strong {
    font-weight: 700;
    color: #1a1a1a;
}

.hero-ayo-pop__clip {
    display: none;
}

@media (prefers-reduced-motion: reduce) {
    .hero-ayo-pop__card {
        animation: none;
    }
}

/* Tool cards beside “craft” in hero */
.hero__ayo,
.hero__craft {
    overflow: visible;
}

.hero-craft-pop {
    position: relative;
    flex-shrink: 0;
    z-index: 1;
    pointer-events: none;
    overflow: visible;
}

.hero-craft-pop__stack {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 10px;
    width: max-content;
    max-width: min(520px, 92vw);
}

.hero-craft-pop__card {
    --craft-pop-pad: 8px;
    --craft-pop-img-r: 10px;
    --craft-pop-outer-r: calc(var(--craft-pop-pad) + var(--craft-pop-img-r));
    position: relative;
    display: block;
    flex-shrink: 0;
    box-sizing: border-box;
    width: 132px;
    padding: var(--craft-pop-pad);
    background: #fff;
    border: 1px solid rgba(170, 178, 190, 0.22);
    border-radius: var(--craft-pop-outer-r);
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.04),
        0 6px 20px rgba(0, 0, 0, 0.07);
    opacity: 1;
    visibility: visible;
}

.hero-craft-pop__card--tilt-left {
    transform: rotate(-9deg);
    z-index: 1;
}

.hero-craft-pop__card--center {
    z-index: 3;
}

.hero-craft-pop__card--tilt-right {
    transform: rotate(9deg);
    z-index: 1;
}

.hero-craft-pop__media {
    display: block;
    width: 100%;
    border-radius: var(--craft-pop-img-r);
    overflow: hidden;
    line-height: 0;
}

.hero-craft-pop__media--tool {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 88px;
    padding: 10px 6px 8px;
    background: #f7f8fa;
    line-height: normal;
}

.hero-craft-pop__tool {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
}

.hero-craft-pop__logo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.hero-craft-pop__caption {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    font-size: 0.68rem;
    font-weight: 600;
    color: #4a5568;
    text-align: center;
    line-height: 1.2;
}

.hero-craft-pop__img {
    display: block;
    width: 100%;
    height: 144px;
    object-fit: cover;
    object-position: center top;
    border-radius: var(--craft-pop-img-r);
}

@media (max-width: 768px) {
    html:has(body.home-page) {
        height: auto;
        min-height: 100%;
        overflow-x: hidden;
        overflow-y: auto;
    }

    body.home-page {
        height: auto;
        min-height: 100dvh;
        max-height: none;
        overflow-x: hidden;
        overflow-y: auto;
    }

    body.home-page > .main {
        flex: 1 0 auto;
        overflow: visible;
    }

    body.home-page {
        --header-offset: 52px;
    }

    body.home-page .hero {
        flex: 0 0 auto;
        justify-content: center;
    }

    body.home-page .hero__title-lead {
        display: block;
        text-wrap: balance;
    }

    body.home-page .hero__craft {
        display: inline-flex;
        flex-direction: row;
        align-items: center;
        flex-basis: auto;
        width: auto;
        max-width: none;
        gap: 8px;
        margin: 0;
        vertical-align: baseline;
    }

    .hero-craft-pop__stack {
        width: min(185px, 58vw);
        max-width: 185px;
        gap: 4px;
        justify-content: flex-start;
    }

    .hero-craft-pop__card {
        width: 59px;
        --craft-pop-pad: 5px;
        --craft-pop-img-r: 7px;
    }

    .hero-craft-pop__media--tool {
        min-height: 68px;
        padding: 6px 3px 5px;
        gap: 4px;
    }

    .hero-craft-pop__tool {
        width: 34px;
        height: 34px;
    }

    .hero-craft-pop__caption {
        font-size: 0.58rem;
    }

    .hero-craft-pop__card--tilt-left {
        transform: rotate(-6deg);
    }

    .hero-craft-pop__card--tilt-right {
        transform: rotate(6deg);
    }

    body.home-page .hero__actions {
        flex-direction: column;
        align-items: stretch;
        align-self: stretch;
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
        gap: 16px;
    }

    body.home-page .hero__cta {
        width: 100%;
        box-sizing: border-box;
    }

    body.home-page .hero__cta--primary {
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.35),
            inset 0 -1px 0 rgba(0, 0, 0, 0.12),
            0 2px 0 #3f2478,
            0 4px 8px rgba(63, 36, 120, 0.25);
    }

    body.home-page .hero__cta--secondary {
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.95),
            inset 0 -1px 0 rgba(0, 0, 0, 0.04),
            0 2px 0 #c8c8ce,
            0 4px 8px rgba(0, 0, 0, 0.06);
    }

    body.home-page .footer__content,
    .footer__content {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        gap: 12px;
    }

    .footer__contact {
        white-space: normal;
        text-align: center;
        width: 100%;
    }

    .footer__made-with {
        justify-content: center;
        white-space: normal;
        text-align: center;
        width: 100%;
    }
}

/* Beating heart animation */
#beating-heart {
    display: inline-block;
    animation: heartbeat 1.5s ease-in-out infinite;
    margin-left: 4px;
}

@keyframes heartbeat {
    0% {
        transform: scale(1);
    }
    14% {
        transform: scale(1.2);
    }
    28% {
        transform: scale(1);
    }
    42% {
        transform: scale(1.2);
    }
    70% {
        transform: scale(1);
    }
}

/* Emoji animations */
.emoji-flex {
    display: inline-block;
    animation: muscle-flex 3s ease-in-out infinite;
    margin: 0 4px;
}

.emoji-twinkle {
    display: inline-block;
    animation: twinkle 1.8s ease-in-out infinite;
    margin: 0 4px;
}

.emoji-rocket {
    display: inline-block;
    animation: rocket 2.5s ease-in-out infinite;
    margin: 0 4px;
}

.emoji-wave {
    display: inline-block;
    animation: wave 2s ease-in-out infinite;
    margin: 0 4px;
    transform-origin: 70% 70%;
}

/* Muscle flexing animation - arm at rest, then muscles clench */
@keyframes muscle-flex {
    0%, 85% {
        transform: scale(1) scaleX(1);
        filter: brightness(1);
    }
    15% {
        transform: scale(1.02) scaleX(0.98);
        filter: brightness(1.05);
    }
    25% {
        transform: scale(1.05) scaleX(0.96);
        filter: brightness(1.08);
    }
    35% {
        transform: scale(1.08) scaleX(0.94);
        filter: brightness(1.1);
    }
    45% {
        transform: scale(1.05) scaleX(0.96);
        filter: brightness(1.08);
    }
    55% {
        transform: scale(1.02) scaleX(0.98);
        filter: brightness(1.05);
    }
}

/* Sparkles twinkle animation */
@keyframes twinkle {
    0%, 100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
    25% {
        transform: scale(1.05) rotate(3deg);
        opacity: 0.9;
    }
    50% {
        transform: scale(0.98) rotate(-3deg);
        opacity: 1;
    }
    75% {
        transform: scale(1.03) rotate(2deg);
        opacity: 0.95;
    }
}

/* Rocket launch animation */
@keyframes rocket {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-1px) rotate(1deg);
    }
    50% {
        transform: translateY(-2px) rotate(-1deg);
    }
    75% {
        transform: translateY(-1px) rotate(1deg);
    }
}

/* Wave animation */
@keyframes wave {
    0%, 100% {
        transform: rotate(0deg);
    }
    10% {
        transform: rotate(14deg);
    }
    20% {
        transform: rotate(-8deg);
    }
    30% {
        transform: rotate(14deg);
    }
    40% {
        transform: rotate(-4deg);
    }
    50% {
        transform: rotate(10deg);
    }
    60% {
        transform: rotate(0deg);
    }
}

/* Table of Contents Styles - HIDDEN */
/*
.case-study__toc {
    position: fixed !important;
    left: 40px !important;
    top: 200px !important;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    padding: 20px;
    width: 240px;
    max-height: 65vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    z-index: 9999 !important;
    transform: none !important;
    opacity: 0;
    transition: opacity 0.3s ease;
}


.case-study__toc-header {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.case-study__toc-title {
    font-size: 13px;
    font-weight: 700;
    color: #333;
    letter-spacing: 0.05em;
    margin: 0;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 6px;
}

.case-study__toc-content {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.case-study__toc-link {
    color: #555;
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.4;
    padding: 10px 14px;
    border-radius: 8px;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    position: relative;
}

.case-study__toc-link:hover {
    color: #6B46C1;
    background-color: rgba(107, 70, 193, 0.05);
    border-left-color: #6B46C1;
}

.case-study__toc-link--active {
    color: #6B46C1;
    background-color: rgba(107, 70, 193, 0.12);
    border-left-color: #6B46C1;
    font-weight: 500;
}
*/

/* Smooth scrolling for anchor links */
html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

/* Ensure case study sections have relative positioning for TOC */
.case-study__section {
    position: relative;
}

/* Hide TOC on smaller screens - HIDDEN */
/*
@media (max-width: 1200px) {
    .case-study__toc-wrapper {
        display: none;
    }
}
*/

/* Before/After Slider Styles */
.before-after-slider {
    margin: 8px 0 32px 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.before-after-labels {
    position: absolute;
    top: 16px;
    left: 16px;
    right: 16px;
    display: flex;
    justify-content: space-between;
    z-index: 10;
    pointer-events: none;
}

.before-after-label-text {
    font-size: 14px;
    color: #333;
    font-weight: 500;
    background: #ffffff;
    padding: 6px 12px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.before-after-container {
    position: relative;
    width: 100%;
    height: 400px;
    cursor: grab;
    user-select: none;
}

.before-after-container:active {
    cursor: grabbing;
}

.slider-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}

.slider-before {
    z-index: 1;
}

.slider-after {
    z-index: 2;
    clip-path: polygon(50% 0%, 100% 0%, 100% 100%, 50% 100%);
    transition: clip-path 0.05s ease-out;
}

.before-after-label {
    position: absolute;
    bottom: 16px;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    z-index: 3;
}

.before-label {
    left: 16px;
}

.after-label {
    right: 16px;
}

.slider-handle {
    position: absolute;
    top: 0;
    left: 50%;
    width: 4px;
    height: 100%;
    background: #fff;
    z-index: 4;
    transform: translateX(-50%);
    cursor: ew-resize;
    transition: left 0.05s ease-out;
}

.slider-line {
    width: 100%;
    height: 100%;
    background: #fff;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
}

.slider-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    color: #333;
    transition: all 0.2s ease;
}

.slider-button:hover {
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.slider-button svg {
    width: 24px;
    height: 24px;
}

body {
    font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
    line-height: 1.5;
    color: #333;
    background-color: transparent;
    overflow-x: hidden;
}


/* Automatic Section Spacing */
section + section {
    margin-top: 24px;
}

section:first-of-type {
    margin-top: 0;
}

/* Auto-fix gaps for main content sections */
.hero + .projects {
    margin-top: 0; /* Override for hero to projects */
}

.projects + section {
    margin-top: 80px;
}


.case-study__section:first-of-type {
    margin-top: 0;
}

/* Auto-fix gaps for about page sections */
.about-hero + .about-content {
    margin-top: 0; /* Override for about-hero to about-content */
}

.about-content + .contact-section {
    margin-top: 80px;
}

/* Auto-fix gaps for nested sections */
.case-study__section .case-study__section {
    margin-top: 60px;
}

.case-study__section .case-study__section:first-of-type {
    margin-top: 40px;
}

/* Auto-fix gaps for cards and grids */
.case-study__cards-grid + .case-study__section {
    margin-top: 60px;
}

.case-study__communication-cards + .case-study__section {
    margin-top: 60px;
}

.case-study__competitive-cards + .case-study__section {
    margin-top: 60px;
}

.case-study__insights-cards + .case-study__section {
    margin-top: 60px;
}

/* Auto-fix gaps for conclusion */
.case-study__conclusion {
    margin-top: 100px;
}

/* Override spacing for bonus screens section */
.case-study__section--large {
    margin-bottom: 0;
    margin-top: 0;
}

/* Override spacing after bonus screens */
.case-study__section--large + .case-study__section {
    margin-top: 16px;
}

/* Indent nested list items in conclusion */
.case-study__reflection-list ul {
    margin-left: 20px;
}

.case-study__reflection-list ul li {
    margin-bottom: 4px;
}

/* Add gap before FEATURES section */
.case-study__section + .case-study__section--large {
    margin-top: 48px;
}

/* Add gap before Competitive Audit section */
.case-study__section--large + .case-study__section--spaced {
    margin-top: 48px;
}

/* Header — removed from markup; keep rules inert if any leftover */
.header {
    display: none !important;
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
    width: 100%;
    max-width: var(--site-max-width);
    margin: 0 auto;
    padding: 0 var(--content-inset);
    border-radius: 0;
    position: relative;
    background: transparent;
}

.header__inner::before {
    content: none;
    display: none;
}

/* Keep pill class inert — logo only, no chrome morph */
html body > .header.header--pill {
    padding: 32px 0 10px;
    background-color: transparent;
    background-image: none;
    border-bottom: none;
}

html body > .header.header--pill .header__inner {
    width: 100%;
    max-width: var(--site-max-width);
    margin: 0 auto;
    padding: 0 var(--content-inset);
    border-radius: 0;
}

html body > .header.header--no-motion,
html body > .header.header--no-motion .header__inner {
    transition: none !important;
}

.header__inner > * {
    position: relative;
    z-index: 1;
}

.header__logo {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    text-decoration: none;
    border-radius: 50%;
    padding: 4px;
    box-sizing: border-box;
    background: #ffffff;
    overflow: hidden;
    outline: none;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0s linear 0s;
    z-index: 2;
}

.header__logo:focus {
    outline: 2px solid #6B46C1;
    outline-offset: 2px;
}

.header__logo:focus:not(:focus-visible) {
    outline: none;
}

.header__logo:focus-visible {
    outline: 2px solid #6B46C1;
    outline-offset: 2px;
}

.header__logo-image {
    width: 24px;
    height: 24px;
    object-fit: contain;
    display: block;
}

/* Scroll-down: translate only. Chrome (bar vs pill) is decided before the slide. */
.header--hidden {
    transform: translate3d(0, calc(-100% - 20px), 0);
    pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
    .header,
    .header__inner {
        transition-duration: 0s;
        transition-delay: 0s;
    }
}

/* ==========================================================================
   Side rail — desktop-only icon dock (middle-right, above AyoLLM FAB)
   One opaque rounded box. Icons only. No track. No glass.
   ========================================================================== */
.side-rail {
    display: none;
    position: fixed;
    top: 50%;
    right: var(--side-rail-right);
    bottom: auto;
    left: auto;
    z-index: 1001;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: auto;
    height: auto;
    margin: 0;
    padding: 0;
    transform: translateY(-50%);
    pointer-events: none;
}

@media (min-width: 1024px) {
    .side-rail {
        display: flex;
    }
}

.side-rail__list {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin: 0;
    padding: 8px;
    list-style: none;
    border: 1px solid #1c1c1c;
    border-radius: 999px;
    background: #141414;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    pointer-events: auto;
}

.side-rail__item {
    list-style: none;
    margin: 0;
    padding: 0;
}

.side-rail__btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: #d4d4d4;
    text-decoration: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    transition: background 0.14s ease, color 0.14s ease;
}

.side-rail__btn svg {
    display: block;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.side-rail__btn:hover {
    background: #222222;
    color: #ffffff;
}

.side-rail__btn:focus {
    outline: none;
}

.side-rail__btn:focus-visible {
    outline: 2px solid #6B46C1;
    outline-offset: 2px;
    color: #ffffff;
}

.side-rail__btn.is-current {
    background: #6B46C1;
    color: #ffffff;
}

.side-rail__btn.is-current:hover {
    background: #5530A3;
    color: #ffffff;
}

.side-rail__btn.is-current:focus-visible {
    color: #ffffff;
}

@media (prefers-reduced-motion: reduce) {
    .side-rail__btn {
        transition: none;
    }
}

/* Main Content */
.main {
    margin-top: 64px;
    min-height: calc(100vh - 64px);
    flex: 1 1 0%;
    padding: 0px;
    flex-direction: column;
}

@media (max-width: 768px) {
    .about-content {
        padding: 40px var(--content-inset);
        max-width: 100%;
        margin: 0 auto;
        text-align: left;
    }
}

/* Hero Section */
.hero {
    padding: 120px var(--content-inset) 40px;
    max-width: 1440px;
    margin: 0 auto;
}

.hero__content {
    max-width: none;
    padding: 0;
    overflow: visible;
}

.hero__subtitle {
    font-size: 18px;
    color: #666;
    margin-bottom: 16px;
    font-weight: 400;
}

.hero__title {
    font-size: 60px;
    font-weight: 650;
    color: #333;
    line-height: 1.2;
    margin: 0;
    max-width: none;
    text-align: left;
    overflow: visible;
}

body.home-page .hero,
body.home-page .hero__content,
body.home-page .hero__title,
body.home-page .hero__title-intro,
body.home-page .hero__title-lead {
    text-align: left;
    overflow: visible;
}

body.home-page .hero {
    position: relative;
    isolation: isolate;
    overflow: visible;
    flex: 0 0 auto;
    min-height: calc(100dvh - var(--header-offset));
    min-height: calc(100svh - var(--header-offset));
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 24px var(--content-inset);
    box-sizing: border-box;
}

/* Hero — floating 3D lifestyle props */
body.home-page .hero__scene,
body.about-page .hero__scene {
    position: relative;
    width: 100%;
    height: 128px;
    margin-bottom: 0;
    z-index: 0;
    pointer-events: none;
    overflow: visible;
    perspective: 1100px;
}

body.home-page .hero__scene-stage,
body.about-page .hero__scene-stage {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: clamp(16px, 3vw, 36px);
    transform-style: preserve-3d;
}

body.home-page .hero__scene .hero-craft-pop {
    flex-shrink: 0;
    z-index: 2;
}

body.home-page .hero__prop,
body.about-page .hero__prop {
    position: relative;
    left: auto;
    bottom: auto;
    top: auto;
    transform-style: preserve-3d;
    pointer-events: none;
    flex-shrink: 0;
}

body.home-page .hero__prop--airpods {
    --prop-tx: -270px;
    animation-delay: 0s;
}

body.home-page .hero__prop--phone {
    --prop-tx: -90px;
    animation-delay: 0.3s;
}

body.home-page .hero__prop--tote {
    --prop-tx: 90px;
    animation-delay: 0.6s;
}

body.home-page .hero__prop--matcha,
body.about-page .hero__prop--matcha {
    animation: hero-prop-shake-matcha 2.4s ease-in-out infinite;
}

@keyframes hero-prop-shake {
    0%, 100% { transform: translate(calc(-50% + var(--prop-tx, 0px)), 0) rotate(0deg); }
    20% { transform: translate(calc(-50% + var(--prop-tx, 0px)), 0) rotate(-5deg); }
    40% { transform: translate(calc(-50% + var(--prop-tx, 0px)), 0) rotate(4deg); }
    60% { transform: translate(calc(-50% + var(--prop-tx, 0px)), 0) rotate(-3deg); }
    80% { transform: translate(calc(-50% + var(--prop-tx, 0px)), 0) rotate(2deg); }
}

@keyframes hero-prop-shake-matcha {
    0%, 100% { transform: rotate(0deg); }
    20% { transform: rotate(-5deg); }
    40% { transform: rotate(4deg); }
    60% { transform: rotate(-3deg); }
    80% { transform: rotate(2deg); }
}

@keyframes hero-prop-shake-mobile {
    0%, 100% { transform: rotate(0deg); }
    20% { transform: rotate(-5deg); }
    40% { transform: rotate(4deg); }
    60% { transform: rotate(-3deg); }
    80% { transform: rotate(2deg); }
}

/* AirPods — 3D render asset */
body.home-page .hero__airpods-img {
    display: block;
    width: min(112px, 13vw);
    height: auto;
    transform: rotateY(18deg) rotateX(-8deg) translateZ(28px);
    transform-style: preserve-3d;
    filter: drop-shadow(0 20px 28px rgba(60, 60, 70, 0.22));
    pointer-events: none;
    user-select: none;
}

/* Phone */
body.home-page .hero__phone {
    position: relative;
    width: 44px;
    height: 88px;
    border-radius: 12px;
    background: linear-gradient(145deg, #3a3a40 0%, #1e1e22 100%);
    transform: rotateY(-32deg) rotateX(8deg) translateZ(32px);
    box-shadow:
        -7px 12px 0 #c8c8ce,
        0 22px 44px rgba(30, 30, 36, 0.22),
        inset 0 0 0 2px #4a4a52;
}

body.home-page .hero__phone-screen {
    position: absolute;
    inset: 7px 5px 10px;
    border-radius: 10px;
    background: linear-gradient(155deg, #6B46C1 0%, #9f7aea 38%, #e9e4f7 72%, #f8f7fa 100%);
    box-shadow: inset 0 0 12px rgba(107, 70, 193, 0.25);
}

body.home-page .hero__phone-notch {
    position: absolute;
    top: 9px;
    left: 50%;
    width: 22px;
    height: 5px;
    margin-left: -11px;
    border-radius: 0 0 6px 6px;
    background: #1e1e22;
}

/* Tote bag — kept for reuse (not in hero markup) */
body.home-page .hero__tote {
    position: relative;
    width: 72px;
    height: 80px;
    transform: rotateY(16deg) rotateX(-6deg) translateZ(20px);
}

body.home-page .hero__tote-handle {
    position: absolute;
    top: 0;
    width: 30px;
    height: 22px;
    border: 3px solid #b8b4ac;
    border-bottom: none;
    border-radius: 16px 16px 0 0;
    box-sizing: border-box;
}

body.home-page .hero__tote-handle--left {
    left: 10px;
}

body.home-page .hero__tote-handle--right {
    right: 10px;
}

body.home-page .hero__tote-body {
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 80px;
    height: 72px;
    margin-left: -40px;
    background: linear-gradient(180deg, #f8f5ef 0%, #ebe6dc 45%, #ddd6ca 100%);
    clip-path: polygon(6% 0, 94% 0, 100% 100%, 0 100%);
    border: 1px solid rgba(120, 110, 95, 0.12);
    box-shadow:
        inset 4px 0 8px rgba(255, 255, 255, 0.5),
        inset -6px 0 10px rgba(0, 0, 0, 0.04),
        -4px 8px 0 #d5cfc4,
        0 16px 32px rgba(80, 70, 55, 0.14);
}

body.home-page .hero__tote-body::before {
    content: '';
    position: absolute;
    left: 14px;
    right: 14px;
    top: 14px;
    height: 1px;
    background: rgba(107, 70, 193, 0.2);
}

/* Matcha */
/* Matcha — 3D render asset */
body.home-page .hero__matcha-img,
body.about-page .hero__matcha-img {
    display: block;
    width: min(112px, 13vw);
    height: auto;
    margin: 0;
    transform: rotateY(0deg) rotateX(0deg);
    transform-style: preserve-3d;
    mix-blend-mode: multiply;
    pointer-events: none;
    user-select: none;
}

body.home-page .hero__portrait {
    position: relative;
    width: 84px;
    height: 84px;
    flex-shrink: 0;
    align-self: flex-start;
    overflow: visible;
    margin: 0 0 var(--hero-portrait-gap);
    z-index: 4;
}

body.home-page .hero__portrait-btn {
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    border-radius: 50%;
    overflow: hidden;
    background: #ececec;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -webkit-tap-highlight-color: transparent;
}

body.home-page .hero__portrait-btn:focus-visible {
    outline: 2px solid rgba(107, 70, 193, 0.55);
    outline-offset: 3px;
}

body.home-page .hero__portrait-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 12%;
    pointer-events: none;
    user-select: none;
}

body.home-page .hero__portrait-pop {
    --bubble-ink: #171717;
    position: absolute;
    left: calc(100% + 10px);
    top: 50%;
    z-index: 40;
    box-sizing: border-box;
    width: max-content;
    max-width: min(260px, calc(100vw - 140px));
    padding: 12px 16px 13px;
    background: #fff;
    border: 2.5px solid var(--bubble-ink);
    border-radius: 22px 24px 26px 20px;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.1));
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-50%) translateX(-6px) scale(0.97);
    transform-origin: left center;
    transition:
        opacity 0.28s cubic-bezier(0.22, 1.15, 0.36, 1),
        visibility 0.28s cubic-bezier(0.22, 1.15, 0.36, 1),
        transform 0.28s cubic-bezier(0.22, 1.15, 0.36, 1);
}

body.home-page .hero__portrait-pop-tail {
    position: absolute;
    left: -15px;
    top: 38%;
    width: 20px;
    height: 22px;
    overflow: visible;
    fill: #fff;
    stroke: var(--bubble-ink);
    stroke-width: 2.4;
    stroke-linejoin: round;
    pointer-events: none;
}

body.home-page .hero__portrait:hover,
body.home-page .hero__portrait:focus-within {
    z-index: 30;
}

body.home-page .hero__portrait:hover .hero__portrait-pop,
body.home-page .hero__portrait:focus-within .hero__portrait-pop {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0) scale(1);
}

body.home-page .hero__portrait-pop-kicker,
body.home-page .hero__portrait-pop-line {
    margin: 0;
    font-family: Caricature, 'Comic Neue', 'Comic Sans MS', cursive;
    font-size: 0.98rem;
    font-weight: 700;
    font-style: normal;
    line-height: 1.28;
    letter-spacing: 0.01em;
    color: #171717;
}

body.home-page .hero__portrait-pop-line {
    margin-top: 3px;
    font-size: 1.08rem;
}

@media (prefers-reduced-motion: reduce) {
    body.home-page .hero__portrait-pop {
        transition: opacity 0.15s ease, visibility 0.15s ease;
        transform: translateY(-50%) translateX(0) scale(1);
    }
}

@media (max-width: 480px) {
    body.home-page .hero__portrait-pop {
        left: 0;
        top: calc(100% + 14px);
        max-width: min(260px, calc(100% - 2 * var(--content-inset)));
        transform: translateY(-6px) scale(0.97);
        transform-origin: 24px top;
    }

    body.home-page .hero__portrait-pop-tail {
        left: 20px;
        top: -16px;
        transform: rotate(90deg);
        transform-origin: center;
    }

    body.home-page .hero__portrait:hover .hero__portrait-pop,
    body.home-page .hero__portrait:focus-within .hero__portrait-pop {
        transform: translateY(0) scale(1);
    }

    @media (prefers-reduced-motion: reduce) {
        body.home-page .hero__portrait-pop {
            transform: translateY(0) scale(1);
        }
    }
}

body.home-page .hero__content {
    position: relative;
    z-index: 1;
    width: 100%;
    min-height: 0;
    overflow: visible;
    --hero-portrait-gap: 14px;
    --hero-stack-gap: clamp(12px, 1.8vh, 16px);
    --hero-cta-gap: clamp(28px, 3.6vh, 42px);
    --hero-footer-gap: 0px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 0;
}

body.home-page .hero__title {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--hero-stack-gap);
    width: 100%;
    margin: 0;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
}

body.home-page .hero__title-intro {
    display: block;
    width: 100%;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.5;
    color: #737373;
    margin: 0;
    text-wrap: pretty;
}

/* Inline Cursor / Figma / Claude marks — static, sentence-scale */
body.home-page .hero__tool-stack {
    display: inline-flex;
    align-items: center;
    gap: 0.28em;
    vertical-align: -0.22em;
    white-space: nowrap;
}

body.home-page .hero__tool-mark-img {
    display: block;
    width: 1.22em;
    height: 1.22em;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 0 0 1px rgba(170, 178, 190, 0.22);
    pointer-events: none;
}

body.home-page .hero__title-lead {
    display: block;
    width: 100%;
    font-size: 56px;
    font-weight: 650;
    line-height: 1.1;
    color: #333;
    margin: 0;
    text-wrap: balance;
}

body.home-page .hero__title-lead .hero__emphasis {
    font-size: inherit;
    line-height: inherit;
}

body.home-page .hero__scene--inline {
    display: inline-flex;
    position: relative;
    width: 1.7em;
    height: 1em;
    min-height: 0;
    margin: 0 0 0 0.18em;
    vertical-align: -0.12em;
    overflow: visible;
    flex: none;
    z-index: 1;
}

body.home-page .hero__scene--inline .hero__scene-stage {
    position: static;
    inset: auto;
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
}

body.home-page .hero__scene--inline .hero__prop--matcha {
    position: absolute;
    left: 0;
    bottom: -0.12em;
    width: 1.7em;
    height: 1.7em;
}

body.home-page .hero__scene--inline .hero__matcha-img {
    position: static;
    left: auto;
    bottom: auto;
    width: 100%;
    height: auto;
}

body.home-page .hero__title-lead::first-letter {
    text-transform: none;
}

@keyframes hero-prop-float-airpods {
    0%, 100% { transform: translateY(0) translateZ(0); }
    50% { transform: translateY(-14px) translateZ(12px); }
}

@keyframes hero-prop-float-phone {
    0%, 100% { transform: translateY(0) translateZ(0); }
    50% { transform: translateY(-16px) translateZ(14px); }
}

@keyframes hero-prop-float-tote {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-12px) rotate(-2deg); }
}

@keyframes hero-prop-float-matcha {
    0%, 100% { transform: translateY(0) translateZ(0); }
    50% { transform: translateY(-14px) translateZ(10px); }
}

@media (prefers-reduced-motion: reduce) {
    body.home-page .hero__scene-stage {
        transition: none;
    }

    body.home-page .hero__prop--matcha,
    body.about-page .hero__prop--matcha {
        animation: none;
    }
}

@media (max-width: 768px) {
    body.home-page .hero__scene:not(.hero__scene--inline) {
        height: auto;
        min-height: 108px;
    }

    body.home-page .hero__scene--inline {
        height: auto;
        min-height: 0;
    }

    body.home-page .hero__scene-stage {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: clamp(12px, 4.5vw, 22px);
        width: 100%;
        height: auto;
        min-height: 100px;
        padding: 0;
        box-sizing: border-box;
    }

    body.home-page .hero__scene--inline .hero__scene-stage {
        width: auto;
        min-height: 0;
    }

    body.home-page .hero__prop {
        position: relative;
        left: auto;
        bottom: auto;
        top: auto;
        flex-shrink: 0;
        transform: none;
        animation: hero-prop-shake-mobile 2.4s ease-in-out infinite;
    }

    body.home-page .hero__prop--airpods {
        animation-delay: 0s;
    }

    body.home-page .hero__prop--phone {
        animation-delay: 0.3s;
    }

    body.home-page .hero__prop--tote {
        animation-delay: 0.6s;
    }

    body.home-page .hero__prop--matcha,
    body.about-page .hero__prop--matcha {
        animation: hero-prop-shake-matcha 2.4s ease-in-out infinite;
    }

    body.home-page .hero__airpods-img {
        width: min(76px, 20vw);
    }

    body.home-page .hero__phone {
        width: 34px;
        height: 68px;
    }

    body.home-page .hero__tote {
        width: 56px;
        height: 62px;
    }

    body.home-page .hero__tote-body {
        width: 52px;
        height: 46px;
        margin-left: -26px;
    }

    body.home-page .hero__tote-handle {
        width: 20px;
        height: 15px;
    }

    body.home-page .hero__matcha-img,
    body.about-page .hero__matcha-img {
        width: min(76px, 20vw);
    }
}

body.home-page .hero__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    align-self: flex-start;
    gap: 12px;
    margin: 0;
    margin-top: var(--hero-cta-gap);
    margin-bottom: var(--hero-footer-gap);
}

body.home-page .hero__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    border-radius: 999px;
    border: none;
    position: relative;
    top: 0;
    transition:
        background 0.15s ease,
        color 0.15s ease,
        border-color 0.15s ease,
        transform 0.12s ease,
        box-shadow 0.12s ease;
}

body.home-page .hero__cta--primary {
    color: #fff;
    background: linear-gradient(180deg, #8b6ae8 0%, #6b46c1 48%, #5530a3 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.35),
        inset 0 -2px 0 rgba(0, 0, 0, 0.12),
        0 4px 0 #3f2478,
        0 6px 14px rgba(63, 36, 120, 0.35);
}

body.home-page .hero__cta--primary:hover {
    background: linear-gradient(180deg, #9474eb 0%, #7252c8 48%, #5c38ad 100%);
    transform: translateY(-2px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.4),
        inset 0 -2px 0 rgba(0, 0, 0, 0.1),
        0 6px 0 #3f2478,
        0 10px 20px rgba(63, 36, 120, 0.38);
}

body.home-page .hero__cta--primary:active {
    transform: translateY(3px);
    background: linear-gradient(180deg, #6b46c1 0%, #5530a3 100%);
    box-shadow:
        inset 0 2px 4px rgba(0, 0, 0, 0.22),
        0 1px 0 #3f2478,
        0 2px 6px rgba(63, 36, 120, 0.25);
}

body.home-page .hero__cta--secondary {
    color: #333;
    background: linear-gradient(180deg, #ffffff 0%, #f0f0f2 55%, #e4e4e8 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.95),
        inset 0 -2px 0 rgba(0, 0, 0, 0.04),
        0 4px 0 #c8c8ce,
        0 6px 12px rgba(0, 0, 0, 0.08);
}

body.home-page .hero__cta--secondary:hover {
    color: #6b46c1;
    background: linear-gradient(180deg, #ffffff 0%, #f6f3fc 55%, #ebe6f8 100%);
    transform: translateY(-2px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 1),
        inset 0 -2px 0 rgba(107, 70, 193, 0.06),
        0 6px 0 #b8b0d4,
        0 10px 18px rgba(107, 70, 193, 0.14);
}

body.home-page .hero__cta--secondary:active {
    transform: translateY(3px);
    color: #5530a3;
    background: linear-gradient(180deg, #e8e8ec 0%, #dedee4 100%);
    box-shadow:
        inset 0 2px 4px rgba(0, 0, 0, 0.1),
        0 1px 0 #c8c8ce,
        0 2px 6px rgba(0, 0, 0, 0.06);
}

body.home-page .hero__cta:focus-visible {
    outline: 2px solid rgba(107, 70, 193, 0.55);
    outline-offset: 4px;
}

.hero__highlight {
    background: linear-gradient(135deg, #7c4dec 0%, #a486fd 100%);
    -webkit-background-clip: text;
    line-height: 1.2;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

/* Projects Section */
.projects {
    padding: 80px var(--content-inset);
    max-width: 1440px;
    margin: 0 auto;
}

body.home-page #work {
    scroll-margin-top: var(--header-offset);
    width: 100%;
}

/* Full-width 2-col covers — fill the work section, no 409px cap */
body.home-page #work .projects__grid {
    margin-top: 0;
    width: 100%;
    max-width: 100%;
    margin-inline: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.home-page #work .projects__content {
    max-width: 1440px;
    margin: 0 auto;
    width: 100%;
}

body.home-page #work .projects__toolbar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    margin: 0 0 32px;
    max-width: 100%;
}

.work-filter {
    display: inline-flex;
    align-items: stretch;
    align-self: center;
    box-sizing: border-box;
    width: max-content;
    max-width: 100%;
    padding: 6px;
    gap: 6px;
    background: #eeeeee;
    border: 0;
    border-radius: 999px;
    overflow: visible;
}

.work-filter__tab {
    appearance: none;
    -webkit-appearance: none;
    flex: 0 0 auto;
    width: auto;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    margin: 0;
    border: 0;
    background: transparent;
    color: #737373;
    font-family: Helvetica, sans-serif;
    font-size: 0.9375rem;
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1.2;
    padding: 11px 20px;
    min-height: 44px;
    border-radius: 999px;
    cursor: pointer;
    white-space: nowrap;
    -webkit-tap-highlight-color: rgba(23, 23, 23, 0.08);
    transition: color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.work-filter__tab:hover:not([aria-selected="true"]) {
    color: #404040;
}

.work-filter__tab[aria-selected="true"] {
    background: #fff;
    color: #5530A3;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.06);
}

.work-filter__tab:focus {
    outline: none;
}

.work-filter__tab:focus:not(:focus-visible) {
    outline: none;
}

.work-filter__tab:focus-visible {
    outline: 2px solid #6B46C1;
    outline-offset: 2px;
}

.project-card[hidden] {
    display: none !important;
}

.projects__content {
    width: 100%;
}

.projects__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px 32px;
    margin-top: 24px;
}

/* Project tiles — cover + type on the page, not boxed cards */
.project-card {
    background: transparent;
    border: 0;
    border-radius: 0;
    overflow: visible;
    min-width: 0;
    box-shadow: none;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

@media (max-width: 768px) {
    body.home-page .hero {
        padding: 24px var(--content-inset);
    }
    
    body.home-page .hero__content {
        padding: 0;
        max-width: 100%;
        margin: 0 auto;
    }

    body.home-page .hero__portrait {
        width: 64px;
        height: 64px;
    }

    body.home-page > .footer {
        padding: 16px 0 20px;
    }

    body.home-page .projects {
        margin-top: 0;
        overflow-x: hidden;
        width: 100%;
        padding: 48px var(--content-inset) 64px;
    }

    body.home-page #work .projects__toolbar {
        align-items: center;
        width: 100%;
        margin-bottom: 24px;
    }

    .work-filter {
        display: inline-flex;
        width: max-content;
        max-width: 100%;
        box-sizing: border-box;
        overflow: visible;
        align-items: stretch;
        padding: 5px;
        gap: 4px;
    }

    .work-filter__tab {
        flex: 0 0 auto;
        width: auto;
        min-width: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
        white-space: nowrap;
        text-align: center;
        font-size: 0.875rem;
        letter-spacing: 0;
        line-height: 1.25;
        padding: 10px 14px;
        min-height: 40px;
        touch-action: manipulation;
    }

    .work-filter__tab[data-work-filter="brand"] {
        white-space: normal;
    }

    .work-filter__label {
        display: block;
        min-width: 0;
        max-width: 100%;
        text-align: center;
    }
    
    .projects__grid {
        grid-template-columns: 1fr;
        gap: 32px;
        margin-top: 20px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .project-card {
        min-width: 0;
        max-width: 100%;
        gap: 10px;
    }
    
    .project-card__image-container {
        flex-shrink: 0;
        padding: 0;
        min-width: 0;
        aspect-ratio: 1 / 1;
    }
    
    .project-card__image {
        width: 100%;
        height: 100%;
        display: block;
        object-fit: cover;
        object-position: top center;
    }
    
    .project-card__content {
        min-width: 0;
        overflow-wrap: break-word;
        padding: 0;
    }
    
    .project-card__description {
        font-size: 14px;
    }
}

.project-card__image-container {
    position: relative;
    z-index: 0;
    flex-shrink: 0;
    width: 100%;
    height: auto;
    min-width: 0;
    padding: 0;
    box-sizing: border-box;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 8px;
    background: #ececec;
    isolation: isolate;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card__image {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: top center;
    border-radius: 0;
    transition: transform 0.3s ease;
}

.project-card__image--center {
    object-position: center;
}

.project-card__image-container > video.project-card__image {
    object-fit: cover;
    object-position: top center;
    pointer-events: none;
    background: #ececec;
}

.project-card__image-container > video.project-card__image::-webkit-media-controls {
    display: none !important;
}

.project-card__content {
    padding: 0 2px 0;
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.project-card__tags {
    display: block;
    margin: 0;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.4;
    color: #737373;
}

.project-card__tag {
    padding: 0;
    margin: 0;
    font-size: inherit;
    font-weight: 400;
    border: 0;
    border-radius: 0;
    color: inherit;
}

.project-card__tag:not(:last-child)::after {
    content: " · ";
}

.project-card .project-card__tag--wide {
    padding: 0;
}

.project-card__title {
    font-weight: 500;
    font-size: 22px;
    color: #171717;
    margin: 0;
    line-height: 1.3;
}

.project-card__description {
    font-size: 14px;
    font-weight: 400;
    color: #737373;
    line-height: 1.4;
    margin: 0;
}

.project-card__link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.project-card__link:focus {
    outline: none;
}

.project-card__link:focus-visible {
    outline: 2px solid #6B46C1;
    outline-offset: 4px;
    border-radius: 8px;
}

@media (hover: hover) and (pointer: fine) {
    .project-card:hover .project-card__image-container {
        transform: translateY(-3px);
        box-shadow: 4px 8px 12px rgba(0, 0, 0, 0.06);
    }

    .project-card:hover img.project-card__image,
    .project-card:hover video.project-card__image {
        transform: scale(1.04);
    }

    .project-card:hover .project-card__image-container--jq .jq-motion__overlay {
        transform: scale(1.04);
    }
}

@media (prefers-reduced-motion: reduce) {
    .project-card__image-container,
    .project-card__image,
    .project-card__image-container--jq .jq-motion__overlay {
        transition: none;
    }

    .project-card:hover .project-card__image-container,
    .project-card:hover .project-card__image,
    .project-card:hover .project-card__image-container--jq .jq-motion__overlay {
        transform: none;
    }
}

.project-card--wip {
    opacity: 0.5;
    filter: grayscale(1);
    pointer-events: none;
    user-select: none;
}

.project-card--wip:hover .project-card__image-container {
    transform: none;
    box-shadow: none;
}

.project-card--wip:hover .project-card__image,
.project-card--wip:hover .jq-motion__overlay {
    transform: none;
}

.project-card--wip .project-card__title,
.project-card--wip .project-card__description,
.project-card--wip .project-card__tag {
    color: #8a8a8a;
}

.project-card__tag--wip {
    font-weight: 600;
    letter-spacing: 0.04em;
}






/* About Page Styles — narrative story with inline interest photos */
.about-story {
    padding: 48px var(--content-inset) 88px;
    max-width: var(--site-max-width);
    margin: 0 auto;
    box-sizing: border-box;
}

.about-story__inner {
    max-width: 680px;
}

.about-story__eyebrow {
    margin: 0 0 10px;
    font-family: Geist, system-ui, Avenir, Helvetica, Arial, sans-serif;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
    color: var(--text-muted);
}

.about-story__title {
    margin: 0 0 28px;
    font-family: Geist, system-ui, Avenir, Helvetica, Arial, sans-serif;
    font-size: clamp(32px, 4.5vw, 44px);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.035em;
    color: var(--text);
    text-wrap: balance;
}

.about-story__title .hero__emphasis {
    font-family: 'Mercury Display', Georgia, 'Times New Roman', serif;
    font-style: italic;
    font-weight: 500;
}

.about-story__prose {
    font-family: Geist, system-ui, Avenir, Helvetica, Arial, sans-serif;
    font-size: 17px;
    font-weight: 400;
    line-height: 1.65;
    color: var(--text-muted);
}

.about-story__prose > p {
    margin: 0 0 1.15em;
    text-wrap: pretty;
}

.about-story__prose > p:last-child {
    margin-bottom: 0;
}

.about-story__figure {
    margin: 0 0 1.35em;
}

.about-story__figure img,
.about-story__shot img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 16px;
    background: #ececef;
}

.about-story__figure figcaption,
.about-story__shot figcaption {
    margin: 0.45em 0 0;
    font-family: Geist, system-ui, Avenir, Helvetica, Arial, sans-serif;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.4;
    color: var(--text-muted);
    opacity: 0.85;
}

.about-story__figure--lead {
    float: right;
    width: min(42%, 260px);
    margin: 0.15em 0 1em 1.35em;
    shape-outside: margin-box;
}

.about-story__figure--lead img {
    aspect-ratio: 3 / 4;
    object-position: center 20%;
}

.about-story__figure--pair {
    clear: both;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 1.75em 0;
}

.about-story__figure--pair + .about-story__figure--pair {
    margin-top: 2.85em;
    margin-bottom: 2.85em;
}

.about-story__shot {
    margin: 0;
    min-width: 0;
}

.about-story__figure--pair img,
.about-story__shot img {
    aspect-ratio: 4 / 5;
    height: 100%;
    object-position: center;
}

.about-story__watched {
    clear: both;
    margin: 2.25em 0 0;
    padding-top: 1.5em;
    border-top: 1px solid var(--hairline, rgba(0, 0, 0, 0.08));
}

.about-story__watched-title {
    margin: 0 0 0.65em;
    font-family: Geist, system-ui, Avenir, Helvetica, Arial, sans-serif;
    font-size: 1.15em;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.02em;
    color: var(--text);
}

.about-story__watched-empty {
    margin: 0;
    font-size: 0.95em;
    line-height: 1.55;
    color: var(--text-muted);
    opacity: 0.9;
}

.about-watched-carousel {
    display: flex;
    align-items: stretch;
    gap: 0.65rem;
    margin: 0.35em 0 0;
}

.about-watched-carousel:focus {
    outline: none;
}

.about-watched-carousel:focus-visible {
    outline: 2px solid rgba(0, 0, 0, 0.28);
    outline-offset: 4px;
    border-radius: 14px;
}

.about-watched-carousel__box {
    flex: 1;
    min-width: 0;
    border: 1px solid var(--hairline, rgba(0, 0, 0, 0.08));
    border-radius: 12px;
    background: #fff;
    padding: 0.9rem 0.9rem 0.8rem;
    box-sizing: border-box;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02);
}

.about-watched-carousel__viewport {
    overflow: hidden;
    border-radius: 8px;
}

.about-watched-carousel__track {
    display: flex;
    margin: 0;
    padding: 0;
    list-style: none;
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
}

.about-watched-carousel__slide {
    flex: 0 0 100%;
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    list-style: none;
}

.about-watched-carousel__figure {
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.about-watched-carousel__figure img,
.about-watched-carousel__fallback {
    display: block;
    width: min(100%, 260px);
    height: auto;
    aspect-ratio: 2 / 3;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.05);
    box-sizing: border-box;
}

.about-watched-carousel__figure img {
    object-fit: cover;
    object-position: center top;
}

.about-watched-carousel__fallback {
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem 0.85rem;
    font-family: Geist, system-ui, Avenir, Helvetica, Arial, sans-serif;
    font-size: 0.95em;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.02em;
    text-align: center;
    color: var(--text-muted, #5c5c5c);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.35), transparent 40%),
        rgba(0, 0, 0, 0.055);
}

.about-watched-carousel__figure.is-fallback img {
    display: none;
}

.about-watched-carousel__figure.is-fallback .about-watched-carousel__fallback {
    display: flex;
}

.about-watched-carousel__figure figcaption {
    margin: 0.7em 0 0;
    max-width: 16rem;
    font-family: Geist, system-ui, Avenir, Helvetica, Arial, sans-serif;
    font-size: 0.92em;
    font-weight: 500;
    line-height: 1.35;
    letter-spacing: -0.01em;
    color: var(--text);
    text-align: center;
}

.about-watched-carousel__nav {
    flex: 0 0 auto;
    align-self: center;
    width: 2.25rem;
    height: 2.25rem;
    margin: 0;
    padding: 0;
    border: 1px solid var(--hairline, rgba(0, 0, 0, 0.08));
    border-radius: 999px;
    background: #fff;
    color: var(--text);
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.about-watched-carousel__nav:hover {
    background: #f4f4f4;
    border-color: rgba(0, 0, 0, 0.14);
}

.about-watched-carousel__nav:focus-visible {
    outline: 2px solid rgba(0, 0, 0, 0.35);
    outline-offset: 2px;
}

.about-watched-carousel__dots {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.35rem;
    margin-top: 0.8rem;
}

.about-watched-carousel__dot {
    width: 0.45rem;
    height: 0.45rem;
    padding: 0;
    border: none;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.16);
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease;
}

.about-watched-carousel__dot.is-active {
    background: rgba(0, 0, 0, 0.55);
    transform: scale(1.15);
}

.about-watched-carousel__dot:focus-visible {
    outline: 2px solid rgba(0, 0, 0, 0.35);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .about-watched-carousel__track {
        transition: none;
    }
}

/* Keep legacy about-bio selectors for any residual markup */
.about-bio {
    padding: 36px var(--content-inset) 88px;
    max-width: var(--site-max-width);
    margin: 0 auto;
    box-sizing: border-box;
}

.about-bio__inner {
    max-width: 640px;
}

.about-bio__eyebrow {
    margin: 0 0 10px;
    font-family: Geist, system-ui, Avenir, Helvetica, Arial, sans-serif;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
    color: var(--text-muted);
}

.about-bio__title {
    margin: 0 0 22px;
    font-family: Geist, system-ui, Avenir, Helvetica, Arial, sans-serif;
    font-size: clamp(32px, 4.5vw, 44px);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.035em;
    color: var(--text);
    text-wrap: balance;
}

.about-bio__title .hero__emphasis {
    font-family: 'Mercury Display', Georgia, 'Times New Roman', serif;
    font-style: italic;
    font-weight: 500;
}

.about-bio__prose {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.about-bio__prose p {
    margin: 0;
    font-family: Geist, system-ui, Avenir, Helvetica, Arial, sans-serif;
    font-size: 17px;
    font-weight: 400;
    line-height: 1.65;
    color: var(--text-muted);
    text-wrap: pretty;
}

.about-content {
    padding: 12px var(--content-inset) 80px;
    max-width: 1440px;
    margin: 0 auto;
}

.about-content__container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 64px;
    align-items: start;
}

.about-content__left {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.profile-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 2px 16px rgba(0,0,0,0.04);
}

.profile-card__image {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.info-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.04);
}

.info-card__icon {
    font-size: 24px;
    margin-bottom: 12px;
}

.info-card__title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.info-card__text {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

.interests-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding: 24px;
    margin-top: 16px;
}

.interest-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border-radius: 8px;
    background: #f9f9f9;
}

.interest-icon {
    font-size: 16px;
}

.interest-text {
    font-size: 14px;
    color: #333;
}

.about-content__right {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.image-gallery {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    height: 600px;
}

.gallery-main {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 2px 16px rgba(0,0,0,0.04);
}

.gallery-main__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-side {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.gallery-side__item {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 2px 16px rgba(0,0,0,0.04);
    flex: 1;
}

.gallery-side__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.contact-section {
    padding: 80px var(--content-inset);
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.contact-section__text {
    font-size: 18px;
    color: #333;
}

.contact-section__email {
    color: #8134df;
    text-decoration: none;
    font-weight: 500;
}

.contact-section__email:hover {
    text-decoration: underline;
}

/* Bento Grid */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: repeat(5, 200px);
    gap: var(--module-gap);
    width: 100%;
    max-width: 1200px;
}

.bento-grid__card {
    background: var(--module-bg);
    border: 1px solid var(--hairline);
    border-radius: var(--module-radius);
    box-shadow: none;
    display: flex;
    flex-direction: column;
    height: 100%; /* ensures card fills the grid cell */
    align-items: center;
    gap: 16px;
    padding: 24px;
    overflow: visible;
}

/* Profile Card */
.bento-grid__profile {
    grid-column: 1 / span 2;
    grid-row: 1 / span 2;
    padding: 16px;
    justify-content: center;
    background: #ffffff;
    border: 1px solid #e0e0e0;
}

.bento-grid__profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
}

/* Location Card */
.bento-grid__location {
    grid-column: 1 / span 2;
    grid-row: 3 / span 1;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
}

.bento-grid__location-content {
    text-align: center;
    width: 100%;
    margin: 0;
}

.bento-grid__location-pin {
    font-size: 20px;
    margin-bottom: 8px;
    margin-top: 0;
}

.bento-grid__location-city {
    font-size: 18px;
    font-weight: 600;
    color: #333111;
    margin-bottom: 4px;
    margin-top: 0;
}

.bento-grid__location-subtitle {
    font-size: 16px;
    color: #595858;
    margin: 0;
}

/* Interests Card */
.bento-grid__interests {
    grid-column: 1 / span 2;
    grid-row: 4 / span 2;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    padding: 24px;
    min-height: 400px;
}

.bento-grid__interests-title {
    font-size: 18px;
    font-weight: 600;
    color: #333111;
    margin-bottom: 16px;
    text-align: left;
    width: 100%;
}

.bento-grid__interests-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    font-size: 14px;
    color: #666666;
}

.bento-grid__interests-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    transition: background-color 0.2s ease;
    cursor: pointer;
    font-size: 16px;
}



.bento-grid__interests-emoji {
    font-size: 16px;
}

.bento-grid__interests-button {
    margin-top: 24px;
    padding: 12px 24px;
    background: #f2f2f2;
    color: #222;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
    width: 100%;
    text-align: center;
}

.bento-grid__interests-button:hover {
    background: #ededed;
}

/* Interests Modal */
.interests-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
}

.interests-modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.interests-modal-header {
    background: #f8f9fa;
    padding: 20px 24px;
    border-radius: 12px 12px 0 0;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.interests-modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.interests-modal-close {
    color: #666;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    background: none;
    border: none;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.interests-modal-close:hover {
    background: #e9ecef;
    color: #333;
}

.interests-modal-body {
    padding: 24px;
}

.interests-modal-description {
    font-size: 14px;
    line-height: 1.6;
    color: #666;
    margin: 0;
}

/* Mobile Responsive for Interests Modal */
@media (max-width: 768px) {
    .interests-modal-content {
        margin: 0;
        width: 95%;
        max-width: none;
        border-radius: 8px;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }
    
    .interests-modal-header {
        padding: 16px 20px;
        border-radius: 8px 8px 0 0;
    }
    
    .interests-modal-title {
        font-size: 16px;
    }
    
    .interests-modal-close {
        font-size: 20px;
        width: 20px;
        height: 20px;
    }
    
    .interests-modal-body {
        padding: 20px;
    }
    
    .interests-modal-description {
        font-size: 13px;
        line-height: 1.5;
    }
}

/* Content Cards (Who Am I, Philosophy, Journey) */
.bento-grid__content {
    grid-column: 3 / span 4;
    grid-row: 1 / span 1;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.04);
    padding: 24px;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    min-height: 140px;
}

.bento-grid__content--philosophy {
    grid-column: 3 / span 2;
    grid-row: 2 / span 1;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.04);
    padding: 24px;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    min-height: 160px;
}

.bento-grid__content--journey {
    grid-column: 5 / span 2;
    grid-row: 2 / span 1;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.04);
    padding: 24px;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    min-height: 160px;
}

.bento-grid__content-icon {
    font-size: 18px;
    margin-right: 16px;
    flex-shrink: 0;
    line-height: 1;
}

.bento-grid__content-text {
    flex: 1;
    margin-top: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.bento-grid__content-title {
    font-size: 18px;
    font-weight: 600;
    color: #333111;
    margin-top: 8px;
}

.bento-grid__content-title--small {
    margin-bottom: 6px;
}

.bento-grid__content-description {
    font-size: 16px;
    color: #595858;
    line-height: 1.7;
    margin-top: 16px;
}

.bento-grid__content-description--tight {
    line-height: 1.5 !important;
}

/* Photo Cards */
.bento-grid__photo {
    border-radius: var(--module-radius);
    overflow: hidden;
    box-shadow: none;
    padding: 0;
}

.bento-grid__photo--scotland {
    grid-column: 3 / span 2;
    grid-row: 3 / span 3;
}

.bento-grid__photo--waterfall {
    grid-column: 5 / span 2;
    grid-row: 3 / span 1;
}

.bento-grid__photo--sheep {
    grid-column: 5 / span 2;
    grid-row: 4 / span 1;
}

.bento-grid__photo--lake {
    grid-column: 5 / span 2;
    grid-row: 5 / span 1;
}

.bento-grid__photo-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Desktop Layout Adjustments */
@media (min-width: 1025px) {
    .bento-grid__content {
        padding: 20px;
        justify-content: flex-start;
        overflow: hidden;
    }
    
    .bento-grid__content--philosophy,
    .bento-grid__content--journey {
        padding: 18px;
        justify-content: flex-start;
        overflow: hidden;
    }
    
    .bento-grid__content-icon {
        margin-bottom: 12px;
    }
    
    .bento-grid__content-title {
        margin-bottom: 6px;
        line-height: 1.3;
    }
    
    .bento-grid__content-description {
        line-height: 1.4;
        margin-bottom: 0;
    }
    
    .bento-grid__content-text {
        width: 100%;
    }
}

/* Case Study Styles */
.case-study {
    max-width: 800px;
    margin: 0 auto;
    /* Match SWP / site chrome: 32px horizontal inset (--site-gutter) */
    padding: 0 var(--site-gutter) 32px;
    box-sizing: border-box;
    font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
    margin-top: 56px;
}

/* Shared back-to-home control (injected on case study pages) */
.case-study__back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 20px;
    padding: 0;
    border: 0;
    background: none;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.2;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.15s ease;
}

.case-study__back-icon {
    display: block;
    flex-shrink: 0;
}

.case-study__back:hover {
    color: var(--text);
}

.case-study__back:focus {
    outline: none;
}

.case-study__back:focus-visible {
    outline: 2px solid var(--text);
    outline-offset: 4px;
    border-radius: 4px;
}

/* Keep back visible above full-bleed heroes (nav-area strip) */
.case-study:has(> .case-study__back + .case-study__hero-banner) {
    margin-top: 0;
    padding-top: 48px;
}

.case-study:has(> .case-study__back + .case-study__hero-banner) > .case-study__back {
    margin: 0 0 16px;
    position: relative;
    z-index: 2;
}

.case-study--swp .cs-toc-article > .case-study__back {
    margin: 0 0 24px;
}

/* Case study hero bleeds under transparent navbar */
body:has(.case-study > .case-study__hero-banner) .main {
    margin-top: 0;
}

.case-study:has(> .case-study__hero-banner) {
    margin-top: 0;
}

.case-study__hero-banner {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    margin-top: calc(-1 * var(--site-header-bleed, 0px));
    margin-bottom: 48px;
    display: flex;
    justify-content: center;
    overflow: hidden;
    z-index: 0;
}

.case-study__hero-banner-image {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    object-position: top center;
}

.case-study__hero-section {
    margin-bottom: 48px;
}

/* Increased spacing between sections for Job Quest */
.case-study--job-quest .case-study__section {
    margin-top: 40px;
}

.case-study--job-quest .case-study__section:first-of-type {
    margin-top: 20px;
}

.case-study--job-quest .case-study__section--spaced {
    margin-top: 50px;
}

/* Reduce spacing in Opportunity section cards */
.case-study--job-quest .case-study__card .case-study__card-title {
    margin-bottom: 8px;
    margin-top: 0;
}

.case-study--job-quest .case-study__card .case-study__card-description {
    margin-top: 8px;
}

.case-study__hero-title {
    font-size: 40px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #333;
    line-height: 1.1;
}

.case-study__hero-title-highlight {
    font-weight: 400;
    color: #333111;
}

.case-study__hero-subtitle {
    font-size: 18px;
    color: #333;
    margin-bottom: 24px;
}

.case-study__project-details {
    margin-top: 32px;
    font-size: 16px;
    color: #333;
    line-height: 1.8;
    font-weight: 400;
}

.case-study__project-detail-item {
    margin-bottom: 8px;
    color: #333;
}

.case-study__project-detail-label {
    font-weight: 600;
}


.case-study__section--spaced {
    margin-top: 80px;
    margin-bottom: 48px;
}

.case-study__section-title {
    font-size: 22px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    margin-top: 16px;
    line-height: 1.3;
}

.case-study__subsection-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
    margin-top: 24px;
}

.case-study__subsection-title--spaced {
    margin-top: 48px;
}

.case-study__section-title--spaced {
    margin-top: 48px;
}

.case-study__section-subtitle {
    font-size: 24px;
    font-weight: 400; /* Fixed invalid font-weight value */
    color: #333;
    margin-bottom: 32px;
    line-height: 1.5;
}

.case-study__section-subtitle--small {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    margin-top: 32px;
    margin-bottom: 16px;
    line-height: 1.4;
}

.case-study__section-text {
    font-size: 16px;
    color: #333;
    line-height: 1.7;
    font-weight: 400; /* Fixed invalid font-weight value */
    margin-bottom: 0;
    margin-top: 8px;
}

/* Add extra spacing after specific text before images */
.case-study__section-text + .case-study__section-image {
    margin-top: 32px; /* Increased gap after text before images */
}

.case-study__section-text strong {
    font-weight: 600;
}

.case-study__section-text-highlight {
    background: #f3e9ff;
    padding: 2px 4px;
    border-radius: 4px;
}

.case-study__section-label {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 1px;
    color: #666;
    margin-bottom: 8px;
    text-transform: uppercase;
}

/* Cards Grid */
.case-study__cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    margin: 24px 0 32px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.case-study__card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.04);
    padding: 24px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    box-sizing: border-box;
}

.case-study__card--small {
    width: 100%;
    max-width: 100%;
}

.case-study__card-icon {
    margin-bottom: 24px;
}

.case-study__card-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #F3E9FF;
    border-radius: 50%;
    width: 36px;
    height: 36px;
}

.case-study__current-experience-title {
    font-weight: 600;
    font-size: 18px;
    margin-bottom: 8px;
    color: #333;
    line-height: 1.3;
}

.case-study__current-experience-description {
    font-size: 16px;
    margin-top: 8px;
    color: #666;
    line-height: 1.7;
}

/* Communication Cards */
.case-study__communication-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    margin-bottom: 32px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.case-study__communication-card {
    background: white;
    border: 1px solid #e0e0e0;
    padding: 20px;
    margin: 0;
    border-radius: 20px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.04);
    position: relative;
    z-index: 1;
}

.case-study__communication-card-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
    line-height: 1.3;
}

.case-study__communication-card-description {
    font-size: 16px;
    color: #666;
    margin-bottom: 24px;
    line-height: 1.7;
}

.case-study__communication-card-image {
    width: 100%;
    margin-top: 16px;
}

.case-study__communication-card-image img {
    width: 100%;
    height: auto;
    border-radius: 12px;
}

/* Competitive Cards */
.case-study__competitive-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 48px;
    margin: 48px 0;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.case-study__competitive-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.04);
    padding: 24px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.case-study__competitive-card:nth-child(3) {
    margin-left: auto;
    margin-right: auto;
}

.case-study__competitive-card-image-container {
    width: 100%;
    height: 330.1px;
    border-radius: 12px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #f8f9fa;
}

.case-study__competitive-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    display: block;
}

.case-study__competitive-card-title {
    font-weight: 600;
    font-size: 18px;
    margin-bottom: 12px;
    margin-top: 8px;
    color: #333;
    text-align: left;
    width: 100%;
    line-height: 1.3;
}

.case-study__competitive-card-description {
    font-size: 16px;
    color: #666666;
    text-align: left;
    font-weight: 400;
    width: 100%;
    line-height: 1.7;
    margin-top: 8px;
}

/* Center the third card */
.case-study__competitive-card:nth-child(3) {
    grid-column: 1 / -1;
    justify-self: center;
    width: 50%;
}

/* Fix image height for calendar card */
.case-study__competitive-card:nth-child(3) .case-study__competitive-card-image-container {
    height: 400px;
}

/* Content wrapper for text */
.case-study__insight-card-content {
    width: 100%;
}

/* Image Modal Styles */
.image-modal {
    display: none;
    position: fixed;
    z-index: 10010;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
}

/* AyoLLM sits at 10020+; hide only while this lightbox is open. */
body.image-modal-open .page-guide,
body.image-modal-open .page-guide__line,
body.image-modal-open .side-rail,
body.image-modal-open .ayo-llm,
body.image-modal-open .ayo-llm__launch,
body.image-modal-open .ayo-llm__panel {
    display: none !important;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

.image-modal-content {
    margin: auto;
    padding: 20px;
    width: 90%;
    max-width: 1200px;
    height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.image-modal-close {
    position: absolute;
    top: 10px;
    right: 25px;
    color: #fff;
    font-size: 35px;
    font-weight: 300;
    cursor: pointer;
    z-index: 1001;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}


.image-modal-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border: none;
    outline: none;
    border-radius: 8px;
    box-shadow: none;
    cursor: pointer;
}

.image-modal-caption {
    margin-top: 16px;
    color: #fff;
    font-size: 14px;
    line-height: 1.5;
    text-align: center;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Make journey map image clickable */
.case-study__journey-map-image {
    cursor: pointer;
}

/* Make affinity diagram image clickable */
.case-study__affinity-diagram-image {
    cursor: pointer;
}

/* Make journey map image clickable */
.case-study__journey-map-image {
    cursor: pointer;
}

/* Affinity diagram viewer spacing */
.affinity-diagram-viewer {
    margin-top: 24px;
}

/* Journey map viewer spacing */
.journey-map-viewer {
    margin-top: 24px;
}

/* Placeholder Container Styles */
.placeholder-container {
    width: 100%;
    max-width: 800px;
    height: 400px;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    padding: 40px;
    box-sizing: border-box;
}

.placeholder-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.placeholder-text {
    font-size: 18px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
    text-align: center;
}

.placeholder-subtext {
    font-size: 14px;
    color: #6c757d;
    text-align: center;
}

/* Make design exploration images clickable */
.case-study__design-exploration-image {
    cursor: pointer;
}

/* Insights Cards */
.case-study__insights-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin: 32px 0;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.case-study__insight-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 20px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.04);
    padding: 24px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    box-sizing: border-box;
}

.case-study__insight-card--alerts {
    grid-column: 1 / -1;
}

.case-study__insight-card-icon {
    margin-bottom: 16px;
}

.case-study__insight-card-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #F3E9FF;
    border-radius: 50%;
    width: 36px;
    height: 36px;
}

.case-study__insight-card-content {
    flex: 1;
    width: 100%;
}

.case-study__card-title {
    font-weight: 600;
    font-size: 18px;
    margin-bottom: 16px;
    margin-top: 8px;
    color: #333;
    line-height: 1.3;
}

.case-study__card-description {
    font-size: 16px;
    margin-top: 16px;
    color: #666;
    line-height: 1.7;
}

/* Idea Titles */
.case-study__idea-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-top: 32px;
    margin-bottom: 16px;
    line-height: 1.3;
}

/* Design Exploration */
.case-study__design-exploration {
    margin: 24px 0;
}

.case-study__design-exploration:last-of-type {
    margin-bottom: 56px;
}

.case-study__design-exploration-image {
    width: 100%;
    height: auto;
    border-radius: 12px;
}

/* Journey Map */
.case-study__journey-map {
    margin: 24px 0;
}

.case-study__journey-map-image {
    width: 100%;
    height: auto;
    border-radius: 12px;
}

.case-study__section-caption {
    margin-top: 12px;
    margin-bottom: 24px; /* Reduced for better fit within ideation sections */
    color: #666;
    font-size: 13px;
    line-height: 1.4;
    text-align: left;
    font-weight: 400;
}

/* Affinity Diagram */
.case-study__affinity-diagram {
    margin: 24px 0;
}

.case-study__affinity-diagram-image {
    width: 100%;
    height: auto;
    border-radius: 12px;
}

/* Final Screens */
.case-study__final-screens {
    margin-top: 64px;
}

.case-study__final-screens-subtitle {
    font-weight: 700;
    font-size: 20px;
    color: #333;
}


.case-study__final-screens-subtitle--parents {
    margin-top: 56px;
}

.case-study__final-screens-image {
    display: flex;
    justify-content: center;
    margin: 24px 0;
}

.case-study__final-screens-img {
    max-width: 100%;
    width: 100%;
    height: auto;
    border-radius: 12px;
}

.case-study__final-screens-imgs {
    width: 50%;
    height: auto;
    border-radius: 12px;
}

/* Conclusion */
.case-study__conclusion {
    margin-top: 80px;
    padding-top: 48px;
    border-top: 1px solid #e0e0e0;
}

.case-study__conclusion-content {
    max-width: 800px;
}

.case-study__conclusion-label {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 1px;
    color: #666;
    margin-bottom: 16px;
    text-transform: uppercase;
}

.case-study__reflection-title {
    font-size: 32px;
    font-weight: 700;
    color: #333;
    margin-bottom: 24px;
    line-height: 1.2;
}

.case-study__reflection-text {
    font-size: 16px;
    color: #333;
    line-height: 1.7;
    margin-bottom: 24px;
    font-weight: 400;
}

.case-study__reflection-list {
    padding-left: 24px;
}

.case-study__reflection-list li {
    margin-bottom: 12px;
}

.case-study__reflection-list ul li {
    margin-bottom: 4px;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .projects__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px;
    }
    
    .about-content__container {
        gap: 48px;
    }
}

@media (max-width: 1024px) {
    body.home-page .hero__title-intro {
        font-size: 18px;
        font-weight: 400;
        line-height: 1.5;
        color: #737373;
    }

    body.home-page .hero__title-lead {
        font-size: 52px;
        line-height: 1.1;
    }

    .hero__title {
        font-size: 40px;
    }

    .about-bio__title {
        font-size: 36px;
    }
    
    .about-content__container {
        grid-template-columns: 1fr;
        gap: 48px;
        display: block;
    }
    
    .image-gallery {
        grid-template-columns: 1fr;
        height: auto;
    }
    
    .gallery-side {
        flex-direction: row;
    }
    
    .gallery-side__item {
        flex: 1;
    }
}

@media (max-width: 768px) {
    :root {
        --site-gutter: 20px;
        /* Sit inside the rails, not on them (was flush at 20px). */
        --content-inset: calc(var(--site-gutter) + 12px);
    }

    .header {
        padding: 32px 0 10px;
        background-color: transparent;
        justify-content: center;
    }
    
    html body > .header.header--pill {
        padding: 32px 0 10px;
    }
    
    .header__inner {
        width: 100%;
        justify-content: flex-start;
        padding: 0 var(--content-inset);
    }

    html body > .header.header--pill .header__inner {
        padding: 0 var(--content-inset);
    }
    
    /* Reduce top gap on About page only */
    body.about-page .main {
        margin-top: 8px;
        min-height: calc(100vh - 8px);
    }
    
    .header__logo {
        width: 32px;
        height: 32px;
        padding: 4px;
        border-radius: 50%;
        background: #ffffff;
    }

    .header__logo-image {
        width: 24px;
        height: 24px;
    }

    /* Homepage: reference - consistent 20px horizontal, ample vertical spacing */
    body.home-page .hero__content {
        --hero-portrait-gap: 14px;
        --hero-stack-gap: 14px;
        --hero-cta-gap: 32px;
        --hero-footer-gap: 0px;
    }

    body.home-page .hero__title-intro {
        font-size: 18px;
        font-weight: 400;
        line-height: 1.5;
        color: #737373;
    }

    body.home-page .hero__title-lead {
        font-size: 40px;
        line-height: 1.12;
    }

    body.home-page .hero__cta {
        padding: 11px 20px;
        font-size: 14px;
    }
    
    body.home-page .hero__scene:not(.hero__scene--inline) {
        height: auto;
        min-height: 88px;
        margin-bottom: 0;
    }

    body.home-page .hero__scene:not(.hero__scene--inline) .hero__scene-stage {
        min-height: 88px;
    }

    body.home-page .hero__scene--inline {
        min-height: 0;
    }

    body.home-page .hero__matcha-img,
    body.about-page .hero__matcha-img {
        width: min(72px, 18vw);
    }

    body.home-page .hero__scene--inline .hero__matcha-img {
        width: 1.7em;
    }

    body.home-page .hero {
        padding: 24px var(--content-inset);
    }
    
    body.home-page .projects {
        padding: 48px var(--content-inset) 64px;
    }
    
    .projects__grid {
        grid-template-columns: 1fr !important;
        gap: 36px !important;
        max-width: 560px !important;
        width: 100%;
        margin: 0 auto !important;
        box-sizing: border-box;
    }
    
    .project-card {
        min-width: 0;
        max-width: 100%;
        background: transparent;
        border: 0;
        box-shadow: none;
    }
    
    .project-card__image-container {
        flex-shrink: 0;
        padding: 0;
        min-width: 0;
        aspect-ratio: 1;
    }
    
    .project-card__image {
        width: 100%;
        height: 100%;
        display: block;
        object-fit: cover;
        object-position: top center;
    }
    
    .project-card__content {
        min-width: 0;
        overflow-wrap: break-word;
        padding: 0 2px 0;
    }
    
    .project-card__tags {
        margin: 0;
    }
    
    .project-card__tag {
        padding: 0;
        margin: 0;
        font-size: inherit;
        border: 0;
    }
    
    /* About page: story prose + inline photos */
    .about-story {
        padding: 48px var(--content-inset) 64px !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        text-align: left !important;
    }

    .about-story__title {
        font-size: 30px;
        margin-bottom: 22px;
    }

    .about-story__prose {
        font-size: 16px;
        line-height: 1.6;
    }

    .about-story__figure--lead {
        float: none;
        width: 100%;
        max-width: 320px;
        margin: 0 0 1.25em;
    }

    .about-story__figure--pair {
        gap: 8px;
        margin: 1.4em 0;
    }

    .about-story__figure--pair + .about-story__figure--pair {
        margin-top: 2.35em;
        margin-bottom: 2.35em;
    }

    .about-story__figure--pair img,
    .about-story__shot img {
        aspect-ratio: 3 / 4;
    }

    .about-story__watched {
        margin-top: 1.85em;
        padding-top: 1.25em;
    }

    .about-watched-carousel {
        gap: 0.35rem;
    }

    .about-watched-carousel__nav {
        width: 2rem;
        height: 2rem;
        font-size: 0.9rem;
    }

    .about-watched-carousel__box {
        padding: 0.7rem 0.7rem 0.65rem;
    }

    .about-watched-carousel__figure img,
    .about-watched-carousel__fallback {
        width: min(100%, 210px);
    }

    .about-watched-carousel__figure figcaption {
        font-size: 0.88em;
    }

    .about-bio {
        padding: 28px var(--content-inset) 64px !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        text-align: left !important;
    }

    .about-bio__title {
        font-size: 30px;
        margin-bottom: 18px;
    }

    .about-bio__prose p {
        font-size: 16px;
        line-height: 1.6;
    }

    .about-content {
        padding: 32px var(--content-inset) 48px !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        text-align: left !important;
    }
    
    .about-content__container {
        display: block !important;
        grid-template-columns: 1fr !important;
        gap: 32px;
        padding: 0 !important;
    }
    
    /* Bento Grid Mobile Responsive */
@media (max-width: 768px) {
    .bento-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        gap: 20px;
        max-width: 560px;
        margin: 0 auto;
    }

    .bento-grid__profile {
        grid-column: 1;
        grid-row: 1;
        min-height: 300px;
    }
    
    .bento-grid__location {
        grid-column: 1;
        grid-row: 2;
    }
    
    .bento-grid__content {
        grid-column: 1;
        grid-row: 3;
    }
    
    .bento-grid__content--philosophy {
        grid-column: 1;
        grid-row: 4;
    }
    
    .bento-grid__content--journey {
        grid-column: 1;
        grid-row: 5;
    }
    
    .bento-grid__interests {
        grid-column: 1;
        grid-row: 6;
    }
    
    .bento-grid__photo--scotland {
        grid-column: 1;
        grid-row: 7;
        height: 200px;
    }
    
    .bento-grid__photo--waterfall {
        grid-column: 1;
        grid-row: 8;
        height: 200px;
    }
    
    .bento-grid__photo--sheep {
        grid-column: 1;
        grid-row: 9;
        height: 200px;
    }
    
    .bento-grid__photo--lake {
        grid-column: 1;
        grid-row: 10;
        height: 200px;
    }
    
    /* Mobile Bento Card Typography */
    .bento-grid__content-title {
        font-size: 18px !important;
    }
    
    .bento-grid__content-description {
        font-size: 16px !important;
    }
    
    .bento-grid__interests-title {
        font-size: 18px !important;
    }
    
    .bento-grid__location-city {
        font-size: 18px !important;
    }
    
    .bento-grid__interests-item {
        font-size: 16px !important;
    }
    
    .bento-grid__content-description {
        line-height: 1.6 !important;
    }
    
    .bento-grid__location-subtitle {
        font-size: 16px !important;
    }
}
    
    .bento-grid__profile {
        min-height: 300px;
    }
    
    .bento-grid__photo {
        height: 200px;
    }
    
    .interests-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-side {
        flex-direction: column;
    }
    
    .contact-section {
        padding: 60px var(--content-inset);
    }
    
    .case-study {
        padding: 0 var(--content-inset) 32px; /* No top padding to eliminate space after navbar */
    }
    
    .case-study__hero-title {
        font-size: 32px;
    }
    
    .case-study__cards-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    /* Make the third card (spanning both columns) responsive */
    .case-study__card[style*="grid-column: 1 / span 2"],
    .case-study__card--span-2 {
        grid-column: 1 !important;
        justify-self: stretch !important;
        width: 100% !important;
    }
    
    /* Ensure all cards stack properly on mobile */
    .case-study__card {
        width: 100%;
        max-width: none;
    }
    
    .case-study__communication-cards {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .case-study__competitive-cards {
        display: grid;
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .case-study__competitive-card {
        min-width: auto;
        max-width: none;
        width: 100%;
    }

    .case-study__competitive-card:nth-child(3) {
        grid-column: auto;
        justify-self: auto;
        width: 100%;
    }
    
    /* Mobile font sizes for case study descriptions */
    .case-study__communication-card-description {
        font-size: 16px;
        font-weight: 400;
    }
    
    .case-study__competitive-card-description {
        font-size: 16px;
        font-weight: 400;
    }
    
    .case-study__card-description {
        font-size: 16px;
        font-weight: 400;
    }
    
    /* Mobile font sizes for case study card titles */
    .case-study__communication-card-title {
        font-size: 18px;
    }
    
    .case-study__competitive-card-title {
        font-size: 18px;
    }
    
    .case-study__card-title {
        font-size: 18px;
    }
    
    /* Mobile font weight consistency for list items */
    .case-study__section-list li {
        font-weight: 400;
    }
    
    .case-study__section-list li strong {
        font-weight: 600;
    }
    
    /* Mobile font weight consistency for ideation descriptions */
    .case-study__ideation-description {
        font-weight: 400;
    }
    
    /* Mobile font weight consistency for reflection text */
    .case-study__reflection-text {
        font-weight: 400;
    }
    
    /* Mobile responsive for reflection section - stack vertically */
    .case-study__reflection-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 32px !important;
    }
    
    .case-study__reflection-grid > div {
        width: 100% !important;
    }
    
    /* Mobile font weight consistency for Guild Gaming competitive cards */
    .case-study--guild-gaming .case-study__competitive-card .case-study__competitive-card-description {
        font-size: 16px;
        font-weight: 400;
    }
    
    .case-study--guild-gaming .case-study__competitive-card .case-study__competitive-card-title {
        font-size: 18px;
        font-weight: 600;
    }
    
    /* Mobile font consistency for Guild Gaming general case study cards */
    .case-study--guild-gaming .case-study__card .case-study__card-title {
        font-size: 18px;
        font-weight: 600;
    }
    
    .case-study--guild-gaming .case-study__card .case-study__card-description {
        font-size: 16px;
        font-weight: 400;
    }
    
    /* Mobile font weight consistency for Baseball insight cards */
    .case-study__insight-card .case-study__card-title {
        font-size: 18px;
        font-weight: 600;
    }
    
    .case-study__insight-card .case-study__card-description {
        font-size: 16px;
        font-weight: 400;
    }
    
    /* Mobile spacing for Baseball case study cards */
    .case-study__card {
        margin-bottom: 16px;
    }
    
    .case-study__card-title {
        margin-bottom: 12px;
    }
    
    .case-study__card-description {
        margin-bottom: 16px;
    }
    
    /* Mobile font consistency for current experience description */
    .case-study__current-experience-description {
        font-size: 16px;
        font-weight: 400;
    }
    
    /* Mobile font consistency for current experience title */
    .case-study__current-experience-title {
        font-size: 18px;
        font-weight: 600;
    }
    
    /* Mobile styling for Next Up section - similar to "You might also like" */
    .case-study__related {
        margin: 40px 16px;
        padding: 24px;
        border-radius: 16px;
    }
    
    .case-study__related-content {
        padding: 0;
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .case-study__related-text h3 {
        font-size: 20px;
        margin-bottom: 12px;
        text-align: left;
        font-weight: 600;
        line-height: 1.2;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .case-study__related-text p {
        font-size: 16px;
        margin-bottom: 20px;
        line-height: 1.5;
        color: #333;
    }
    
    .case-study__related-link {
        font-size: 15px;
        display: inline-block;
        color: #8134df;
        font-weight: 600;
        text-decoration: none;
    }
    
    /* Mobile layout: image on top, text below in single column */
    .case-study__related-content {
        display: grid !important;
        grid-template-columns: 1fr !important;
        grid-template-rows: auto auto !important;
        gap: 16px !important;
        max-width: none !important;
        padding: 0 !important;
    }
    
    .case-study__related-image-container {
        grid-row: 1;
        order: -1;
    }
    
    .case-study__related-image {
        width: 100%;
        height: 900px;
        object-fit: cover;
        border-radius: 12px;
    }
    
    .case-study__related-text {
        grid-row: 2;
        margin-top: 16px;
    }
    


    .case-study__competitive-card-image-container {
        height: auto;
    }

    .case-study__competitive-card:nth-child(3) .case-study__competitive-card-image-container {
        height: auto;
    }
    
    .case-study__insights-cards {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .case-study__final-screens-imgs {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .hero__title {
        font-size: 28px;
    }

    .hero__content {
        max-width: 520px;
    }
    
    .about-bio__title {
        font-size: 26px;
    }
    
    .case-study__hero-title {
        font-size: 28px;
    }
    
    .project-card__content {
        padding: 0 2px 0;
    }

    .project-card__title {
        font-size: 22px;
    }
    
    .info-card {
        padding: 20px;
    }
    
    .case-study__card {
        padding: 20px;
    }
    
    /* Additional responsive improvements for cards */
    .case-study__card-title {
        font-size: 18px;
        line-height: 1.4;
        margin-bottom: 12px;
    }
    
    .case-study__card-description {
        font-size: 16px;
        line-height: 1.6;
    }
    
    .case-study__card-icon {
        margin-bottom: 20px;
    }
    
    .case-study__card-icon-wrapper {
        width: 32px;
        height: 32px;
    }
    
    .case-study__communication-card {
        padding: 16px;
    }
    
    .case-study__competitive-card {
        padding: 20px;
    }
    
    .case-study__insight-card {
        padding: 20px;
    }
    
    /* Extra small screen improvements for cards */
    .case-study__card-title {
        font-size: 18px;
        line-height: 1.3;
        margin-bottom: 10px;
    }
    
    .case-study__card-description {
        font-size: 16px;
        line-height: 1.5;
    }
    
    .case-study__card-icon {
        margin-bottom: 16px;
    }
    
    .case-study__card-icon-wrapper {
        width: 28px;
        height: 28px;
    }
}

/* Guild Gaming Case Study Specific Styles */
.case-study--guild-gaming {
    /* Main container for Guild Gaming case study */
}

/* Guild Gaming spacing to match Baseball Little League */
.case-study--guild-gaming .case-study__section {
    margin-bottom: 40px; /* Match general case study spacing */
}

.case-study--guild-gaming .case-study__section--spaced {
    margin-top: 80px; /* Match general case study spacing */
}

/* Reduce space between "Landing on a Solution" title and image in Guild Gaming */
.case-study--guild-gaming .case-study__section-title + .case-study__section-image {
    margin-top: 16px;
}

.case-study--guild-gaming .case-study__cards-grid + .case-study__section {
    margin-top: 60px; /* Keep this specific spacing */
}

.case-study--guild-gaming .case-study__ideation-section {
    margin: 24px 0 !important;
}

.case-study--guild-gaming .case-study__ideation-section + .case-study__ideation-section {
    margin-top: 24px !important;
}

.case-study--guild-gaming .case-study__ideation-title {
    margin-bottom: 8px !important;
}

.case-study--guild-gaming .case-study__ideation-description {
    margin-bottom: 12px !important;
}

.case-study--guild-gaming .case-study__ideation-section .case-study__section-image {
    margin-top: 12px !important;
    margin-bottom: 4px !important;
}

.case-study--guild-gaming .case-study__ideation-section .case-study__section-caption {
    margin-top: 4px !important;
    margin-bottom: 12px !important;
}



.case-study--guild-gaming .case-study__quote {
    margin: 32px 0; /* Match general quote spacing */
}
.quote-mark {
    font-size: 30px;
    color: #333;
    line-height: 1;
    display: inline;
}

.case-study__quote .quote-mark:first-of-type {
    vertical-align: top;
}

.case-study__quote .quote-mark:last-of-type {
    vertical-align: bottom;
}
  
.case-study--guild-gaming .case-study__company-logos {
    margin: 48px 0; /* Match general company logos spacing */
}

.case-study--guild-gaming .case-study__placeholder {
    margin: 24px auto; /* Match general placeholder spacing */
}

/* Quote styling */
.case-study__quote {
    background: #f8f9fa;
    border-left: 4px solid #9B6FD9;
    padding: 24px;
    margin: 32px 0; /* Consistent with Guild Gaming override */
    border-radius: 8px;
    font-style: italic;
    font-size: 18px;
    line-height: 1.6;
    color: #333;
    position: relative;
}

.case-study__quote-attribution {
    text-align: right;
    font-style: normal;
    font-weight: 600;
    color: #666666;
    margin-top: 16px;
    font-size: 14px;
}

/* Section list styling */
.case-study__section-list {
    margin: 24px 0;
    padding-left: 24px;
}

.case-study__section-list li {
    margin-bottom: 16px;
    line-height: 1.6;
    color: #333;
    font-weight: 400;
}

.case-study__section-list li strong {
    font-weight: 600;
}

/* Company logos section */
.case-study__company-logos {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    margin: 48px 0; /* Consistent with Guild Gaming override */
    max-width: 800px; /* Match the case study content width */
    margin-left: 0; /* Align with left edge of text content */
    margin-right: auto;
}

/* Ensure equal column widths */
.case-study__company-logos > * {
    width: 100%;
    max-width: none; /* Allow full width */
}

/* Make the third logo span the full bottom row */
.case-study__company-logo:nth-child(3) {
    grid-column: 1 / -1;
    max-width: none; /* Allow full width */
    justify-self: center;
    margin: 0 auto; /* Center the card horizontally */
}

/* Enhanced logo card styling to match the reference image */
.case-study__company-logo {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.04);
    padding: 24px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    width: 100%; /* Ensure consistent width */
    box-sizing: border-box; /* Include padding in width calculation */
}




.case-study__company-logo-img {
    width: 100%;
    height: auto;
    max-height: 60px;
    object-fit: contain;
}



/* Ideation section styling */
.case-study__ideation-section {
    margin: 48px 0;
    border-radius: 16px;
    width: 100%; /* Full width */
    max-width: none; /* Remove any width constraints */
}

.case-study__ideation-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin-bottom: 16px;
    line-height: 1.3;
}

.case-study__ideation-description {
    font-size: 16px;
    color: #333;
    line-height: 1.6;
    margin-bottom: 24px;
    font-weight: 400;
}

/* Placeholder styling */
.case-study__placeholder {
    width: 100%;
    max-width: 800px;
    height: 200px;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 24px auto; /* Consistent with Guild Gaming override */
    color: #666666;
    font-style: italic;
}

.case-study__placeholder--large {
    height: 300px;
}

.case-study__placeholder-content {
    text-align: center;
}

.case-study__placeholder-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.case-study__placeholder-title {
    font-size: 18px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
}

.case-study__placeholder-subtitle {
    font-size: 14px;
    color: #6c757d;
}

/* Guild Gaming specific overrides */
.case-study--guild-gaming .case-study__hero-banner {
    margin-bottom: 48px;
    display: flex;
    justify-content: center;
    overflow: hidden;
}

.case-study--guild-gaming .case-study__hero-banner--desktop {
    margin-bottom: 96px;
}

.case-study--guild-gaming .case-study__hero-banner-image {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

/* Job Quest / Baseball / Guild covers — sit in the ~800px case-study column
   (same width as title/body), not rail-to-rail and not 100vw. SWP excluded. */
.case-study--job-quest:not(.case-study--swp) .case-study__hero-banner,
.case-study--baseball .case-study__hero-banner,
.case-study--guild-gaming .case-study__hero-banner {
    width: 100%;
    max-width: 100%;
    left: auto;
    right: auto;
    margin-left: 0;
    margin-right: 0;
    margin-top: 0;
    padding-top: 0;
    border-radius: 0;
    overflow: hidden;
}

.case-study--job-quest:not(.case-study--swp) .case-study__hero-banner-image,
.case-study--baseball .case-study__hero-banner-image,
.case-study--guild-gaming .case-study__hero-banner-image {
    width: 100%;
    height: auto;
    aspect-ratio: auto;
    object-fit: unset;
    object-position: top center;
    border-radius: 16px;
    overflow: hidden;
}

.case-study__project-detail-item--role {
    max-width: 42em;
}

.case-study__role-summary {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px 8px;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.case-study__role-summary::-webkit-details-marker,
.case-study__role-summary::marker {
    display: none;
    content: '';
}

.case-study__role-summary::after {
    content: '';
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 5px 4px 0 4px;
    border-color: #333 transparent transparent transparent;
    transform: translateY(1px);
    transition: transform 0.15s ease;
}

.case-study__role-details[open] .case-study__role-summary::after {
    transform: translateY(1px) rotate(180deg);
}

.case-study__role-summary:focus-visible {
    outline: 2px solid rgba(107, 70, 193, 0.55);
    outline-offset: 3px;
    border-radius: 4px;
}

.case-study__role-body {
    margin-top: 8px;
}

.case-study__role-body p {
    margin: 0;
}

.case-study__role-list {
    margin: 10px 0 4px;
    padding-left: 1.2em;
}

.case-study__role-list li + li {
    margin-top: 8px;
}

@media (prefers-reduced-motion: reduce) {
    .case-study__role-summary::after {
        transition: none;
    }
}

/* Job Quest cover motion — Figma 2509:14970.
   Play forward, then hold the AI panel. No boomerang — reverse undoes the story.
   Cycle is 16.226s: click + rest beat, coupled card exit, Thinking hold 1.6s,
   panel in (4086–4986ms), copy cascade (4486–6226ms), then 10s end-screen hold.
   Loop snaps back to the suggestion card. Stage is authored at 1440×1088 and
   scaled to the clip with 100cqi/1440 so it never overflows as a raw 1440px box. */
.jq-motion {
    --jq-stage-w: 1440;
    --jq-stage-h: 1088;
    --jq-cycle: 16.226s;
    --jq-scale: calc(100cqi / 1440);
    container-type: inline-size;
    container-name: jq-motion;
    position: relative;
    overflow: hidden;
    contain: paint;
    background: #fffce1;
}

.project-card__image-container--jq {
    overflow: hidden;
    background: #fffce1;
}

.project-card .project-card__image-container--jq .jq-motion__overlay {
    transform-origin: center center;
    transition: transform 0.3s ease;
}

/* Banner sits flush; cream lives on .jq-motion, not as a top inset gap. */
.case-study--job-quest:not(.case-study--swp) .case-study__hero-banner {
    overflow: hidden;
    background: transparent;
}

.jq-motion--hero {
    position: relative;
    width: 100%;
    aspect-ratio: 1440 / 1088;
    overflow: hidden;
    background: #fffce1;
    border-radius: 16px;
}

.jq-motion__overlay {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 2;
    background: #fffce1;
}

.jq-motion__stage {
    position: absolute;
    left: 0;
    top: 50%;
    width: 1440px;
    height: 1088px;
    margin-top: -544px;
    transform: scale(var(--jq-scale));
    transform-origin: left center;
    background: #fffce1;
    font-family: Inter, "Inter", system-ui, sans-serif;
    color: #353652;
    /* Figma rasterises type with grayscale AA; without this the stems render
       noticeably heavier than the source frame on macOS. */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.jq-card-pos {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 556.5px;
    transform: translate(-50%, -50%);
}

.jq-card {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
    padding: 24px;
    background: #fff;
    border: 1px solid #6366f1;
    outline: none;
    border-radius: 9px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    animation:
        kf_2509_15236_opacity_0 var(--jq-cycle) linear infinite,
        kf_2509_15236_translate_0 var(--jq-cycle) linear infinite,
        kf_2509_15236_scale_0 var(--jq-cycle) linear infinite;
}

.jq-card__label,
.jq-card__body,
.jq-card__footer,
.jq-help {
    margin: 0;
}

/* Figma nests the body + footer in their own 24px-gap group (2509:15241),
   inside the card's 12px-gap column. */
.jq-card__group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
    width: 100%;
}

.jq-card__label {
    width: 100%;
    font-size: 21px;
    font-weight: 400;
    line-height: 1.45;
    color: #353652;
}

/* Figma codegen reports 31.5px here, but that is font-size x line-height.
   Measured against the frame render the type is 21px/1.5 (see .jq-card__label). */
.jq-card__body {
    width: 508.5px;
    max-width: 100%;
    font-size: 21px;
    font-weight: 500;
    line-height: 1.5;
    color: #353652;
}

.jq-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.jq-card__icons {
    display: flex;
    align-items: center;
    gap: 8.57px;
}

.jq-card__icons img {
    display: block;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
}

.jq-help {
    display: inline-block;
    font-size: 21px;
    font-weight: 500;
    line-height: normal;
    color: #6366f1;
    white-space: nowrap;
    transform-origin: center center;
    animation:
        kf_2509_15251_opacity_0 var(--jq-cycle) linear infinite,
        kf_2509_15251_scale_0 var(--jq-cycle) linear infinite;
}

.jq-think {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 136px;
    height: 34px;
    margin: 0;
    transform: translate(-50%, -50%);
    font-size: 28px;
    font-weight: 400;
    line-height: 34px;
    letter-spacing: 0;
    text-align: center;
    white-space: nowrap;
    background-image: linear-gradient(to right, #6366f1 0%, #4e50be 50%, #393b8b 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    animation: kf_2519_2300_opacity_0 var(--jq-cycle) linear infinite;
}

.jq-ai {
    position: absolute;
    left: 518.5px;
    top: 70px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-sizing: border-box;
    width: 435px;
    height: 966px;
    padding: 16px;
    background: #fafafa;
    border: 0;
    box-shadow: none;
    border-radius: 0 0 16px 16px;
    transform-origin: center center;
    animation:
        kf_2519_2302_opacity_0 var(--jq-cycle) linear infinite,
        kf_2519_2302_width_0 var(--jq-cycle) linear infinite,
        kf_2519_2302_translate_0 var(--jq-cycle) linear infinite,
        kf_2519_2302_scale_0 var(--jq-cycle) linear infinite;
}

.jq-ai__scroll {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 24px;
    width: 100%;
    min-height: 0;
    overflow: hidden;
}

.jq-ai__bubble {
    align-self: flex-end;
    flex-shrink: 0;
    box-sizing: border-box;
    width: 242px;
    padding: 12px;
    overflow: hidden;
    background: #7b7dce;
    border-radius: 6px 0 6px 6px;
    color: #fefefe;
    font-size: 16px;
    line-height: normal;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.jq-ai__output {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    gap: 24px;
    width: 100%;
    color: #353652;
    font-size: 14px;
    line-height: 1.4;
}

.jq-ai__output p,
.jq-ai__output ul {
    margin: 0;
}

.jq-ai__output ul {
    padding-left: 1.5em;
}

.jq-ai__stack,
.jq-ai__head {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.jq-ai__sec {
    display: flex;
    flex-direction: column;
    gap: 16px;
    justify-content: center;
    width: 100%;
    padding: 8px 0;
}

.jq-ai__sec--ruled {
    padding: 16px 0;
    border-top: 1px solid rgba(122, 122, 155, 0.25);
    border-bottom: 1px solid rgba(122, 122, 155, 0.25);
}

/* Chrome measures Inter ~0.3px wider than Figma's shaper over a 403px line,
   which pushed one word of the quote onto the next line. The extra half pixel
   restores Figma's line breaks without changing any other wrap. */
.jq-ai__rich {
    width: 403.5px;
}

/* Figma keeps these as one text layer with empty lines between blocks; the
   sibling margins below reproduce those blank lines at their authored sizes. */
.jq-ai__rich > .jq-ai__h + p {
    margin-top: 19px;
}

.jq-ai__rich > p + p,
.jq-ai__rich > ul + p {
    margin-top: 17px;
}

.jq-ai__emblem {
    display: flex;
    align-items: center;
    gap: 2px;
}

.jq-ai__avatars {
    display: flex;
    align-items: center;
}

.jq-ai__avatars img {
    display: block;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
}

.jq-ai__avatars img:not(:last-child) {
    margin-right: -6px;
}

/* Figma renders the first avatar at 21.5px inside a 20px box (inset -3.75%). */
.jq-ai__avatars img:first-child {
    width: 21.5px;
    height: 21.5px;
    margin-top: -0.75px;
    margin-left: -0.75px;
}

.jq-ai__count {
    font-size: 14px;
    font-weight: 500;
    line-height: normal;
    text-align: center;
}

.jq-ai__lede {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    padding: 16px 0;
    border-bottom: 1px solid rgba(122, 122, 155, 0.25);
}

.jq-ai__h {
    font-size: 16px;
    font-weight: 600;
}

.jq-ai__chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    width: 100%;
}

/* Figma: 114px label inside 6px horizontal padding = 126px pill. */
.jq-ai__chips span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-width: 126px;
    padding: 8px 6px;
    background: #ececf3;
    border-radius: 30px;
    color: #3e408d;
    font-size: 12px;
    font-weight: 600;
    line-height: normal;
    text-align: center;
}

.jq-ai__react {
    display: flex;
    align-items: center;
    gap: 8px;
}

.jq-ai__react img {
    display: block;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

.jq-ai__field {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    width: 403px;
    box-sizing: border-box;
    background: #fff;
    border-radius: 24px;
    /* Inside-aligned stroke (see .jq-card) keeps the field at Figma's 89px. */
    box-shadow: inset 0 0 0 1px rgba(122, 122, 155, 0.25), 0 2px 4px rgba(0, 0, 0, 0.08);
}

.jq-ai__field-input {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
    padding: 16px;
}

.jq-ai__field-input p {
    margin: 0;
    color: #6f6e6e;
    font-size: 14px;
    line-height: normal;
    white-space: nowrap;
}

.jq-ai__field-bottom {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    width: 100%;
    box-sizing: border-box;
    padding: 8px 16px;
}

.jq-ai__send {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 4.8px;
    background: #d5d7da;
    border-radius: 30px;
}

.jq-ai__send img {
    display: block;
    width: 14.4px;
    height: 14.4px;
}

/* AI answer copy: fade+rise as the panel becomes visible (~44% through the
   900ms shell fade, 4486ms). Stagger is baked into keyframe % so it repeats
   every loop — animation-delay only applies to the first iteration. */
.jq-ai__bubble,
.jq-ai__emblem,
.jq-ai__lede,
.jq-ai__sec:not(.jq-ai__sec--ruled) .jq-ai__rich > *,
.jq-ai__sec:not(.jq-ai__sec--ruled) .jq-ai__chips,
.jq-ai__sec--ruled,
.jq-ai__react,
.jq-ai__field {
    animation: kf_jq_ai_in_0 var(--jq-cycle) linear infinite;
}

.jq-ai__emblem {
    animation-name: kf_jq_ai_in_1;
}

.jq-ai__lede {
    animation-name: kf_jq_ai_in_2;
}

.jq-ai__sec:not(.jq-ai__sec--ruled) .jq-ai__rich > :nth-child(1) {
    animation-name: kf_jq_ai_in_3;
}

.jq-ai__sec:not(.jq-ai__sec--ruled) .jq-ai__rich > :nth-child(2) {
    animation-name: kf_jq_ai_in_4;
}

.jq-ai__sec:not(.jq-ai__sec--ruled) .jq-ai__rich > :nth-child(3) {
    animation-name: kf_jq_ai_in_5;
}

.jq-ai__sec:not(.jq-ai__sec--ruled) .jq-ai__rich > :nth-child(4) {
    animation-name: kf_jq_ai_in_6;
}

.jq-ai__sec:not(.jq-ai__sec--ruled) .jq-ai__rich > :nth-child(5) {
    animation-name: kf_jq_ai_in_7;
}

.jq-ai__sec:not(.jq-ai__sec--ruled) .jq-ai__rich > :nth-child(6) {
    animation-name: kf_jq_ai_in_8;
}

.jq-ai__sec:not(.jq-ai__sec--ruled) .jq-ai__chips {
    animation-name: kf_jq_ai_in_9;
}

.jq-ai__sec--ruled {
    animation-name: kf_jq_ai_in_10;
}

.jq-ai__react {
    animation-name: kf_jq_ai_in_11;
}

.jq-ai__field {
    animation-name: kf_jq_ai_in_12;
}

/* Times below are % of the 16.226s cycle. Absolute ms for suggestion → thinking →
   panel-in / cascade match the prior 10s authoring; the extra ~6.2s is end hold.
   After the click springs back (~1046ms), the card rests ~400ms, then
   opacity/scale/rise ease together for 800ms. Thinking hold is still 1.6s.
   Cascade finishes at 6226ms; output holds fully visible for 10s before loop. */

@keyframes kf_2509_15236_opacity_0 {
    0% { opacity: 1; }
    8.912% { animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1); opacity: 1; }
    13.842% { opacity: 0; }
    100% { opacity: 0; }
}

@keyframes kf_2509_15236_translate_0 {
    0% { translate: 0 0; }
    8.912% { animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1); translate: 0 0; }
    13.842% { translate: 0 -60px; }
    100% { translate: 0 -60px; }
}

@keyframes kf_2509_15236_scale_0 {
    0% { scale: 1 1; }
    8.912% { animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1); scale: 1 1; }
    13.842% { scale: 1.2 1.2; }
    100% { scale: 1.2 1.2; }
}

@keyframes kf_2509_15251_opacity_0 {
    0% { opacity: 1; }
    1.572% { animation-timing-function: cubic-bezier(0.15, 0.85, 0.3, 1); opacity: 1; }
    1.941% { opacity: 0.5; }
    2.471% { animation-timing-function: cubic-bezier(0.3, 0, 0.5, 1); opacity: 0.5; }
    6.034% { opacity: 1; }
    100% { opacity: 1; }
}

@keyframes kf_2509_15251_scale_0 {
    0% { scale: 1 1; }
    1.528% { animation-timing-function: cubic-bezier(0.15, 0.85, 0.3, 1); scale: 1 1; }
    1.941% { scale: 0.8 0.8; }
    2.471% { animation-timing-function: cubic-bezier(0.3, 0, 0.5, 1); scale: 0.8 0.8; }
    6.446% { scale: 1 1; }
    100% { scale: 1 1; }
}

/* Thinking: Figma snaps on at 2273ms. Figma faded it out by 2979ms (~0.7s).
   Hold 1.6s at full opacity, then Figma's 113ms fade. No export flicker. */
@keyframes kf_2519_2300_opacity_0 {
    0% { opacity: 0; }
    13.836% { animation-timing-function: cubic-bezier(0.5, 0, 0.5, 1); opacity: 0; }
    14.008% { opacity: 1; }
    23.869% { animation-timing-function: cubic-bezier(0.55, 0, 0.68, 0.55); opacity: 1; }
    24.566% { opacity: 0; }
    100% { opacity: 0; }
}

/* Panel waits 100ms after Thinking is gone (3986ms), then all tracks ease
   together for 900ms so rise/scale don't finish ahead of the fade. */
@keyframes kf_2519_2302_opacity_0 {
    0% { opacity: 0; }
    25.182% { animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1); opacity: 0; }
    30.728% { opacity: 1; }
    100% { opacity: 1; }
}

/* Figma exports the end width as 425.833px, but the panel's laid-out width is
   435px (16px padding around 403px content). Ending at 425.833px would clip the
   403px text field, so the final keyframe is pinned to the real 435px box. */
@keyframes kf_2519_2302_width_0 {
    0% { width: 403px; }
    25.182% { width: 435px; }
    100% { width: 435px; }
}

@keyframes kf_2519_2302_translate_0 {
    0% { translate: 0 40px; }
    25.182% { animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1); translate: 0 40px; }
    30.728% { translate: -0.017px 0; }
    100% { translate: -0.017px 0; }
}

@keyframes kf_2519_2302_scale_0 {
    0% { scale: 0.95 0.95; }
    25.182% { animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1); scale: 0.95 0.95; }
    30.728% { scale: 1 1; }
    100% { scale: 1 1; }
}

/* Content blocks: 500ms fade/rise, 10px, same ease as the panel.
   Step 0 at 4486ms; major beats +120ms; explainer paragraphs +80ms. */
@keyframes kf_jq_ai_in_0 {
    0% { opacity: 0; translate: 0 10px; }
    27.647% { animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1); opacity: 0; translate: 0 10px; }
    30.728% { opacity: 1; translate: 0 0; }
    100% { opacity: 1; translate: 0 0; }
}

@keyframes kf_jq_ai_in_1 {
    0% { opacity: 0; translate: 0 10px; }
    28.387% { animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1); opacity: 0; translate: 0 10px; }
    31.468% { opacity: 1; translate: 0 0; }
    100% { opacity: 1; translate: 0 0; }
}

@keyframes kf_jq_ai_in_2 {
    0% { opacity: 0; translate: 0 10px; }
    29.126% { animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1); opacity: 0; translate: 0 10px; }
    32.208% { opacity: 1; translate: 0 0; }
    100% { opacity: 1; translate: 0 0; }
}

@keyframes kf_jq_ai_in_3 {
    0% { opacity: 0; translate: 0 10px; }
    29.866% { animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1); opacity: 0; translate: 0 10px; }
    32.947% { opacity: 1; translate: 0 0; }
    100% { opacity: 1; translate: 0 0; }
}

@keyframes kf_jq_ai_in_4 {
    0% { opacity: 0; translate: 0 10px; }
    30.359% { animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1); opacity: 0; translate: 0 10px; }
    33.440% { opacity: 1; translate: 0 0; }
    100% { opacity: 1; translate: 0 0; }
}

@keyframes kf_jq_ai_in_5 {
    0% { opacity: 0; translate: 0 10px; }
    30.852% { animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1); opacity: 0; translate: 0 10px; }
    33.933% { opacity: 1; translate: 0 0; }
    100% { opacity: 1; translate: 0 0; }
}

@keyframes kf_jq_ai_in_6 {
    0% { opacity: 0; translate: 0 10px; }
    31.345% { animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1); opacity: 0; translate: 0 10px; }
    34.426% { opacity: 1; translate: 0 0; }
    100% { opacity: 1; translate: 0 0; }
}

@keyframes kf_jq_ai_in_7 {
    0% { opacity: 0; translate: 0 10px; }
    31.838% { animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1); opacity: 0; translate: 0 10px; }
    34.919% { opacity: 1; translate: 0 0; }
    100% { opacity: 1; translate: 0 0; }
}

@keyframes kf_jq_ai_in_8 {
    0% { opacity: 0; translate: 0 10px; }
    32.331% { animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1); opacity: 0; translate: 0 10px; }
    35.412% { opacity: 1; translate: 0 0; }
    100% { opacity: 1; translate: 0 0; }
}

@keyframes kf_jq_ai_in_9 {
    0% { opacity: 0; translate: 0 10px; }
    33.070% { animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1); opacity: 0; translate: 0 10px; }
    36.152% { opacity: 1; translate: 0 0; }
    100% { opacity: 1; translate: 0 0; }
}

@keyframes kf_jq_ai_in_10 {
    0% { opacity: 0; translate: 0 10px; }
    33.810% { animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1); opacity: 0; translate: 0 10px; }
    36.891% { opacity: 1; translate: 0 0; }
    100% { opacity: 1; translate: 0 0; }
}

@keyframes kf_jq_ai_in_11 {
    0% { opacity: 0; translate: 0 10px; }
    34.549% { animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1); opacity: 0; translate: 0 10px; }
    37.631% { opacity: 1; translate: 0 0; }
    100% { opacity: 1; translate: 0 0; }
}

@keyframes kf_jq_ai_in_12 {
    0% { opacity: 0; translate: 0 10px; }
    35.289% { animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1); opacity: 0; translate: 0 10px; }
    38.371% { opacity: 1; translate: 0 0; }
    100% { opacity: 1; translate: 0 0; }
}


@media (prefers-reduced-motion: reduce) {
    .jq-card,
    .jq-help,
    .jq-think,
    .jq-ai,
    .jq-ai__bubble,
    .jq-ai__emblem,
    .jq-ai__lede,
    .jq-ai__sec:not(.jq-ai__sec--ruled) .jq-ai__rich > *,
    .jq-ai__sec:not(.jq-ai__sec--ruled) .jq-ai__chips,
    .jq-ai__sec--ruled,
    .jq-ai__react,
    .jq-ai__field {
        animation: none !important;
    }

    .jq-card {
        opacity: 1;
        translate: none;
        scale: none;
    }

    .jq-help {
        opacity: 1;
        scale: none;
    }

    .jq-think,
    .jq-ai {
        opacity: 0;
    }

    .jq-ai__bubble,
    .jq-ai__emblem,
    .jq-ai__lede,
    .jq-ai__sec:not(.jq-ai__sec--ruled) .jq-ai__rich > *,
    .jq-ai__sec:not(.jq-ai__sec--ruled) .jq-ai__chips,
    .jq-ai__sec--ruled,
    .jq-ai__react,
    .jq-ai__field {
        opacity: 1;
        translate: none;
    }
}

/* Competitive card styling for Guild Gaming */
.case-study--guild-gaming .case-study__competitive-card {
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.04);
    padding: 24px;
    width: 100%;
    max-width: 100%; /* Allow full width like general case study */
    margin: 0; /* Remove auto margin to match general case study */
}

.case-study--guild-gaming .case-study__competitive-card .case-study__competitive-card-img {
    width: 100%;
    height: 400px; /* Fixed height for better control */
    object-fit: cover;
    border-radius: 12px;
    display: block; /* Ensure proper display */
}

/* Fix video container within competitive card */
.case-study--guild-gaming .case-study__competitive-card .case-study__competitive-card-image-container {
    width: 100%;
    height: 400px; /* Match video height */
    border-radius: 12px;
    overflow: hidden; /* Ensure video stays within bounds */
}

/* Bento grid content styling for Guild Gaming */
.bento-grid__content-wrapper {
    /* Wrapper for bento grid content */
}

/* Section image styling for Guild Gaming */
.case-study__section-image {
    display: flex;
    justify-content: center;
    margin: 16px 0 12px 0; /* Bottom margin matches caption's margin-top for consistent spacing */
}

.case-study__section-img {
    max-width: 100%; /* Allow full width for images */
    width: 100%;
    height: auto;
    border-radius: 8px;
}



.bento-grid__content {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.04);
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-height: 140px;
}

.bento-grid__content--philosophy {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.04);
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-height: 160px;
}

.bento-grid__content--journey {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.04);
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-height: 160px;
}

/* Mobile responsive styles for Guild Gaming */
@media (max-width: 768px) {
    .case-study__company-logos {
        grid-template-columns: 1fr;
        gap: 24px;
        max-width: 400px;
    }
    
    .case-study__company-logo {
        min-height: 100px;
        padding: 20px;
    }
    
    /* Company logos responsive behavior */
    .case-study__company-logos {
        grid-template-columns: 1fr; /* Single column on mobile */
        gap: 24px;
        max-width: 100%; /* Full width on mobile */
        margin: 32px 0; /* Remove auto margins for full width */
    }
    
    /* Reset the third logo span on mobile */
    .case-study__company-logo:nth-child(3) {
        grid-column: 1;
        max-width: 100%;
        justify-self: stretch;
    }
    
    .case-study__company-logo {
        min-height: 100px;
        padding: 20px;
        width: 100%;
    }
    
    .case-study__company-logo-img {
        max-height: 50px;
    }
    
    .case-study__ideation-section {
        padding: 24px 16px;
        margin: 32px 0;
    }
    
    .case-study__quote {
        padding: 20px 16px;
        margin: 24px 0;
        font-size: 16px;
    }
    
    .case-study__placeholder {
        height: 150px;
        margin: 20px auto;
    }
    
    .case-study__placeholder--large {
        height: 200px;
    }
    
    /* Section image responsive styles */
    .case-study__section-img {
        max-width: 100%; /* Allow full width on mobile */
        width: 100%;
        height: auto;
    }
}

/* Additional card styling to replace inline styles */
.case-study__card--with-border {
    border: 1px solid #e0e0e0;
}

.case-study__communication-card--with-border {
    border: 1px solid #e0e0e0;
}

.case-study__competitive-card--with-border {
    border: 1px solid #e0e0e0;
}

.case-study__insight-card--with-border {
    border: 1px solid #e0e0e0;
}

/* Image container styling to replace inline styles */
.case-study__image-container {
    width: 100%;
    display: flex;
    justify-content: center;
}

.case-study__image-wrapper {
    border-radius: 20px;
    max-width: 540px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    overflow: hidden;
}

.case-study__image {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 20px;
    display: block;
}

/* Third card spanning both columns styling */
.case-study__card--span-2 {
    grid-column: 1 / span 2;
    justify-self: center;
}

/* Hero title highlight styling */
.case-study__hero-title-highlight {
    font-weight: 400;
    color: #333;
}

/* Spacer utility class */
.case-study__spacer {
    height: 16px;
}

/* Work Page Styles */
body.work-page .main {
    margin-top: 64px;
}

body.work-page .work-hero {
    padding-top: 48px;
    padding-bottom: 0;
    background: transparent;
}

body.work-page .work-page__projects {
    padding: 32px 32px 96px;
    max-width: 1440px;
    margin: 0 auto;
}

body.work-page .work-page__projects .projects__grid {
    margin-top: 0;
}

@media (max-width: 768px) {
    body.work-page .work-hero {
        padding: 48px var(--content-inset) 0;
        text-align: center;
    }

    body.work-page .work-hero__title {
        font-size: 36px;
        text-align: center;
    }

    body.work-page .work-hero__intro {
        font-size: 16px;
        text-align: center;
    }

    body.work-page .work-page__projects {
        padding: 32px var(--content-inset) 64px;
    }
}

@media (max-width: 768px) {
    body:has(.case-study > .case-study__hero-banner) {
        --site-header-bleed: 0px;
    }
}

.work-hero {
    background: transparent;
    padding: 120px 32px 80px;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.work-hero__intro {
    margin: 16px 0 0;
    font-size: 18px;
    color: #666;
    font-weight: 400;
    line-height: 1.5;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

.work-hero__title {
    font-size: 48px;
    font-weight: 700;
    color: #333;
    line-height: 1.2;
    max-width: 800px;
    margin: 0 auto;
}

.work-hero__highlight {
    color: #8B5CF6;
}

/* Work Projects Section */
.work-projects {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px 80px;
}

.work-projects__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 48px;
    margin-top: 64px;
}

/* Individual Project Cards */
.work-project {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.work-project__mockup {
    border-radius: 16px;
    padding: 24px;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.work-project__mockup--baseball {
    background: #E0F2FE;
}

.work-project__mockup--gaming {
    background: #F3E8FF;
}

/* Baseball Project Mockup */
.work-project__phone {
    background: white;
    border-radius: 20px;
    padding: 20px;
    width: 200px;
    height: 350px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.work-project__calendar {
    text-align: center;
}

.work-project__calendar-header {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 16px;
}

.work-project__calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 12px;
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

.work-project__calendar-dates {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 16px;
    font-size: 12px;
    color: #333;
}

.work-project__calendar-dates .highlight {
    background: #8B5CF6;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.work-project__upcoming {
    text-align: left;
    border-top: 1px solid #eee;
    padding-top: 12px;
}

.work-project__upcoming-title {
    font-size: 12px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.work-project__upcoming-date {
    font-size: 11px;
    color: #666;
}

/* Gaming Project Mockup */
.work-project__dashboard {
    background: #1F2937;
    border-radius: 12px;
    width: 300px;
    height: 250px;
    display: flex;
    color: white;
    overflow: hidden;
}

.work-project__sidebar {
    background: #374151;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 120px;
}

.work-project__nav-item {
    font-size: 10px;
    padding: 6px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.work-project__nav-item:hover {
    background: #4B5563;
}

.work-project__main {
    padding: 16px;
    flex: 1;
}

.work-project__header {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.work-project__subtitle {
    font-size: 10px;
    color: #9CA3AF;
    margin-bottom: 16px;
}

.work-project__metrics {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.work-project__metric {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.work-project__metric-label {
    font-size: 10px;
    color: #9CA3AF;
}

.work-project__metric-value {
    font-size: 16px;
    font-weight: 600;
}

.work-project__chart {
    width: 100%;
    height: 40px;
    background: #4B5563;
    border-radius: 6px;
    margin-bottom: 16px;
}

.work-project__popup {
    background: #F9FAFB;
    border-radius: 8px;
    padding: 12px;
    color: #333;
}

.work-project__popup-question {
    font-size: 10px;
    margin-bottom: 8px;
    font-weight: 500;
}

.work-project__popup-input input {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #D1D5DB;
    border-radius: 4px;
    font-size: 10px;
    margin-bottom: 8px;
}

.work-project__popup-suggestions {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.work-project__suggestion {
    font-size: 9px;
    color: #6B7280;
    padding: 4px 6px;
    background: #F3F4F6;
    border-radius: 4px;
    cursor: pointer;
}

/* Project Tags */
.work-project__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.work-project__tag {
    background: #F3F4F6;
    color: #374151;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

/* Project Content */
.work-project__title {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.work-project__description {
    font-size: 16px;
    color: #6B7280;
    line-height: 1.6;
    margin: 0;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .work-hero {
        padding: 80px var(--content-inset) 60px;
        text-align: left;
    }
    
    .work-hero__title {
        font-size: 32px;
        text-align: left;
    }
    
    .work-projects {
        padding: 0 var(--content-inset) 60px;
    }
    
    .work-projects__grid {
        grid-template-columns: 1fr;
        gap: 40px;
        margin-top: 40px;
    }
    
    .work-project__mockup {
        min-height: 250px;
        padding: 16px;
    }
    
    .work-project__phone {
        width: 160px;
        height: 280px;
    }
    
    .work-project__dashboard {
        width: 250px;
        height: 200px;
    }
    
    .work-project__sidebar {
        min-width: 100px;
        padding: 12px;
    }
    
    .work-project__main {
        padding: 12px;
    }
    
    .work-project__title {
        font-size: 20px;
    }
    
    .work-project__description {
        font-size: 14px;
    }
}

/* Back to Top — only while the footer is in view; shares rail right edge */
#back-to-top {
    height: 40px;
    width: 52px;
    position: fixed;
    right: var(--side-rail-right);
    bottom: var(--page-bound-bottom);
    z-index: 10002;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin: 0;
    border: 1px solid #e0e0e0;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 18px;
    line-height: 1;
    color: inherit;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    touch-action: manipulation;
}

#back-to-top.is-at-bottom {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

#back-to-top:hover {
    background: #f8f9fa;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

@media (max-width: 768px) {
    #back-to-top {
        width: 52px;
        height: 36px;
        font-size: 16px;
    }
}

body.has-ayo-llm #back-to-top {
    bottom: calc(var(--page-bound-bottom) + 60px);
}

@media (max-width: 768px) {
    body.has-ayo-llm #back-to-top {
        bottom: calc(var(--page-bound-bottom) + 60px);
    }
}

/* Related Case Study Section */
.case-study__related {
    margin: 100px 0 60px 0;
    padding: 60px 0;
    border-radius: 20px;
}

.case-study__related-title {
    font-size: 28px;
    font-weight: 600;
    color: #333;
    text-align: center;
    margin-bottom: 40px;
}

.case-study__related-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 32px;
}

.case-study__related-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 32px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

.case-study__related-text {
    padding: 20px 0;
}

.case-study__related-text h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 16px 0;
    color: #333;
}

.case-study__related-text p {
    font-size: 16px;
    line-height: 1.6;
    margin: 0 0 20px 0;
    color: #666;
}

.case-study__related-link {
    color: #8134df;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: color 0.2s ease;
}

.case-study__related-link:hover {
    color: #6b21a8;
}

.case-study__related-link:focus-visible {
    outline: 2px solid rgba(107, 70, 193, 0.5);
    outline-offset: 2px;
}

/* Narrative glue between paired case studies (SWP ↔ sandbox) */
.case-study__eyebrow {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #666;
    margin: 0 0 8px;
}

.case-study__context {
    font-size: 15px;
    line-height: 1.5;
    color: #666;
    margin: 0 0 20px;
}

.case-study__bridge {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35em 0.75em;
}

.case-study__related--swp-bridge {
    margin: 48px 0 40px;
    padding: 0;
    border-radius: 0;
}

.case-study__related-content--bridge {
    display: block;
    max-width: 800px;
    margin: 0;
    padding: 0;
}

.case-study--swp .case-study__related--swp-bridge {
    max-width: 800px;
}

.case-study--swp .case-study__related--swp-bridge .case-study__related-text {
    padding: 0;
}

.case-study--swp .case-study__related--swp-bridge .case-study__related-text h3 {
    font-size: 22px;
    margin-bottom: 12px;
}

.case-study--swp .case-study__related--swp-bridge .case-study__related-text p {
    margin-bottom: 16px;
}

/* Name → LinkedIn: floating portrait card, matching home craft / project cards */
.person-pop {
    position: relative;
    display: inline;
    white-space: nowrap;
    z-index: 2;
}

.person-pop:hover,
.person-pop:focus-visible {
    z-index: 30;
}

.person-pop__card {
    --person-pop-pad: 8px;
    --person-pop-img-r: 10px;
    --person-pop-outer-r: calc(var(--person-pop-pad) + var(--person-pop-img-r));
    --person-pop-rest: translateX(-50%) translateY(6px) scale(0.97);
    --person-pop-show: translateX(-50%) translateY(-2px) scale(1);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 10px);
    z-index: 40;
    box-sizing: border-box;
    width: 132px;
    padding: var(--person-pop-pad);
    color: #4a5568;
    font-weight: 400;
    background: #fff;
    border: 1px solid rgba(170, 178, 190, 0.22);
    border-radius: var(--person-pop-outer-r);
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.04),
        0 6px 20px rgba(0, 0, 0, 0.07);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: var(--person-pop-rest);
    transform-origin: center bottom;
    transition:
        opacity 0.32s cubic-bezier(0.22, 1.15, 0.36, 1),
        visibility 0.32s cubic-bezier(0.22, 1.15, 0.36, 1),
        transform 0.32s cubic-bezier(0.22, 1.15, 0.36, 1),
        box-shadow 0.2s ease;
    white-space: normal;
}

.person-pop__card::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 2px solid transparent;
    border-radius: inherit;
    pointer-events: none;
    transition: border-color 0.2s ease;
}

.person-pop__media {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    border-radius: var(--person-pop-img-r);
    overflow: hidden;
    line-height: 0;
}

.person-pop__img {
    display: block;
    width: 100%;
    height: 116px;
    object-fit: cover;
    object-position: center 18%;
    border-radius: var(--person-pop-img-r);
}

.person-pop__caption {
    position: relative;
    z-index: 1;
    display: block;
    margin-top: 6px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    font-size: 0.68rem;
    font-weight: 600;
    color: #4a5568;
    text-align: center;
    line-height: 1.2;
}

@media (min-width: 769px) {
    .person-pop:focus-visible .person-pop__card,
    .person-pop.is-open .person-pop__card {
        opacity: 1;
        visibility: visible;
        transform: var(--person-pop-show);
        box-shadow:
            0 1px 2px rgba(0, 0, 0, 0.04),
            0 8px 24px rgba(0, 0, 0, 0.08);
    }

    .person-pop:focus-visible .person-pop__card::before,
    .person-pop.is-open .person-pop__card::before {
        border-color: #8864ff;
    }
}

button.person-pop {
    appearance: none;
    -webkit-appearance: none;
    background: none;
    border: 0;
    padding: 0;
    margin: 0;
    font: inherit;
    font-weight: 600;
    font-size: inherit;
    line-height: inherit;
    letter-spacing: inherit;
    color: #8134df;
    cursor: pointer;
    text-align: inherit;
    vertical-align: baseline;
    -webkit-tap-highlight-color: transparent;
}

button.person-pop:hover {
    color: #6b21a8;
}

.person-pop--shot .person-pop__card {
    width: 148px;
}

.person-pop--shot .person-pop__img {
    height: 224px;
    object-fit: cover;
    object-position: top center;
}

.person-pop--shot-tablet .person-pop__card {
    width: 196px;
}

.person-pop--shot-tablet .person-pop__img {
    height: 236px;
}

@media (max-width: 640px) {
    .person-pop--shot {
        white-space: normal;
    }

    .person-pop--shot .person-pop__card {
        width: 140px;
    }

    .person-pop--shot-tablet .person-pop__card {
        width: 168px;
    }

    .person-pop--shot .person-pop__img,
    .person-pop--shot-tablet .person-pop__img {
        height: 200px;
    }
}

/* Desktop: hover previews. Mobile / touch: no floating cards, no inline preview chips. */
.person-pop-shots {
    display: none;
}

@media (max-width: 768px), (hover: none), (pointer: coarse) {
    .person-pop__card {
        display: none;
    }

    button.person-pop {
        pointer-events: none;
        cursor: inherit;
        color: inherit;
        -webkit-tap-highlight-color: transparent;
    }

    /* Athlete-card (and leftover services) mobile preview shots stay hidden on phone. */
    .person-pop-shots,
    .person-pop-shots__item--athlete {
        display: none;
    }
}

@media (hover: hover) and (pointer: fine) and (min-width: 769px) {
    .person-pop:hover .person-pop__card {
        opacity: 1;
        visibility: visible;
        transform: var(--person-pop-show);
        box-shadow:
            0 1px 2px rgba(0, 0, 0, 0.04),
            0 8px 24px rgba(0, 0, 0, 0.08);
    }

    .person-pop:hover .person-pop__card::before {
        border-color: #8864ff;
    }
}

@media (prefers-reduced-motion: reduce) {
    .person-pop__card {
        --person-pop-rest: translateX(-50%) translateY(0) scale(1);
        --person-pop-show: translateX(-50%) translateY(0) scale(1);
        transition: opacity 0.15s ease, visibility 0.15s ease;
    }
}

.case-study__related-image-container {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.case-study__related-image-container:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

.case-study__related-mockup {
    width: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.case-study__related-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

/* Footer */
.footer {
    background: transparent;
    padding: 40px 0;
    margin-top: 80px;
}

.footer__content {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 24px;
    width: 100%;
    max-width: var(--site-max-width);
    margin: 0 auto;
    padding: 0 var(--content-inset);
    text-align: left;
}

.footer__contact {
    font-size: 16px;
    color: #444444;
    margin: 0;
    font-weight: 400;
    flex-shrink: 0;
    white-space: nowrap;
}

.footer__email {
    color: #722FC5;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.footer__email:hover {
    color: #8449CB;
}

.footer__made-with {
    font-size: 14px;
    color: #666666;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-shrink: 0;
    white-space: nowrap;
    text-align: right;
}

.footer__spotify-logo {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    fill: #000000;
}

/* Footer Mobile Responsiveness */
@media (max-width: 768px) {
    .footer {
        width: 100%;
        padding: 32px 0 max(32px, env(safe-area-inset-bottom, 0px));
        margin-top: 60px;
        box-sizing: border-box;
    }

    .footer__content {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        gap: 12px;
        width: 100%;
        max-width: var(--site-max-width);
    }
    
    .footer__contact {
        font-size: 14px;
        white-space: normal;
        text-align: center;
        width: 100%;
    }
    
    .footer__made-with {
        font-size: 14px;
        justify-content: center;
        white-space: normal;
        text-align: center;
        width: 100%;
    }
    
    .footer__spotify-logo {
        width: 18px;
        height: 18px;
    }
}

/* Small Mobile Devices (iPhone SE, small Android) */
@media (max-width: 480px) {
    .header {
        padding: 32px 0 10px;
        background-color: transparent;
    }

    html body > .header.header--pill {
        padding: 32px 0 10px;
    }
    
    .header__inner {
        padding: 0 var(--content-inset);
    }

    html body > .header.header--pill .header__inner {
        padding: 0 var(--content-inset);
    }

    .header__logo {
        width: 32px;
        height: 32px;
        padding: 4px;
        border-radius: 50%;
        background: #ffffff;
    }
    
    .header__logo-image {
        width: 24px;
        height: 24px;
    }
    
    body.home-page .hero {
        padding: 20px var(--content-inset);
    }
    
    body.home-page .hero__content {
        --hero-portrait-gap: 12px;
        --hero-stack-gap: 10px;
        --hero-cta-gap: 26px;
        --hero-footer-gap: 0px;
    }

    body.home-page .hero__portrait {
        width: 60px;
        height: 60px;
    }

    body.home-page .hero__scene--inline .hero__matcha-img {
        width: 1.7em;
    }

    body.home-page .hero__title-intro {
        font-size: 18px;
        font-weight: 400;
        line-height: 1.45;
        color: #737373;
    }

    body.home-page .hero__tool-mark-img {
        width: 1.28em;
        height: 1.28em;
        border-radius: 5px;
    }

    body.home-page .hero__title-lead {
        font-size: clamp(24px, 7.6vw, 32px);
        line-height: 1.15;
    }

    body.home-page > .footer {
        padding: 16px 0 20px;
    }

    body.home-page .footer__contact,
    body.home-page .footer__made-with {
        font-size: 13px;
    }

    body.home-page .hero__actions {
        gap: 14px;
        max-width: 100%;
    }

    .work-filter {
        padding: 4px;
        gap: 3px;
    }

    .work-filter__tab {
        font-size: 0.8125rem;
        letter-spacing: 0;
        padding: 9px 12px;
        line-height: 1.25;
        min-height: 38px;
    }

    .work-filter__tab[data-work-filter="brand"] {
        white-space: normal;
    }

    .work-filter__keep {
        white-space: nowrap;
    }
    
    body.home-page .projects {
        padding: 40px var(--content-inset) 56px;
    }
    
    .projects__grid {
        max-width: 520px !important;
        width: 100%;
        gap: 28px !important;
        box-sizing: border-box;
    }
    
    .project-card {
        min-width: 0;
        max-width: 100%;
        background: transparent;
        border: 0;
        box-shadow: none;
    }
    
    .project-card__image-container {
        flex-shrink: 0;
        padding: 0;
        min-width: 0;
        aspect-ratio: 1;
    }
    
    .project-card__image {
        width: 100%;
        height: 100%;
        display: block;
        object-fit: cover;
        object-position: top center;
    }
    
    .project-card__content {
        min-width: 0;
        overflow-wrap: break-word;
        padding: 0 2px 0;
    }
    
    .project-card__title {
        font-size: 18px;
    }
    
    .project-card__description,
    .project-card__tags {
        font-size: 13px;
    }
    
    .project-card__tag {
        padding: 0;
        font-size: inherit;
        border: 0;
    }
    
    /* About page: story prose + inline photos */
    .about-story {
        padding: 48px var(--content-inset) 52px;
    }

    .about-story__title {
        font-size: 28px;
    }

    .about-story__prose {
        font-size: 15px;
    }

    .about-story__figure--pair {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }

    .about-bio {
        padding: 24px var(--content-inset) 52px;
    }

    .about-bio__title {
        font-size: 28px;
    }

    .about-bio__prose p {
        font-size: 15px;
    }

    .about-content {
        padding: 28px var(--content-inset) 40px;
    }
    
    .bento-grid {
        gap: 16px;
        max-width: 520px;
    }
    
    .bento-grid__content-title {
        font-size: 16px !important;
    }
    
    .bento-grid__content-description {
        font-size: 14px !important;
        line-height: 1.5 !important;
    }
    
    .bento-grid__interests-title {
        font-size: 16px !important;
    }
    
    .bento-grid__interests-item {
        font-size: 14px !important;
    }
    
    .bento-grid__location-city {
        font-size: 16px !important;
    }
    
    .bento-grid__location-subtitle {
        font-size: 14px !important;
    }
    
    /* Case Studies */
    .case-study {
        padding: 0 var(--content-inset) 24px;
    }
    
    .case-study__hero-title {
        font-size: 28px;
    }
    
    .case-study__card-title {
        font-size: 16px;
    }
    
    .case-study__card-description {
        font-size: 14px;
    }
    
    /* Footer */
    .footer {
        padding: 24px 0;
        margin-top: 40px;
    }
    
    .footer__content {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        gap: 10px;
    }

    .footer__contact {
        font-size: 12px;
        min-width: 0;
        white-space: normal;
        text-align: center;
        width: 100%;
    }

    .footer__made-with {
        font-size: 11px;
        min-width: 0;
        justify-content: center;
        white-space: normal;
        text-align: center;
        width: 100%;
    }

    .footer__spotify-logo {
        width: 16px;
        height: 16px;
    }
}

/* iPhone SE / 320-wide: keep Brand & Web Design readable without overflow */
@media (max-width: 360px) {
    body.home-page .hero__title-intro {
        font-size: 18px;
        line-height: 1.45;
    }

    body.home-page .hero__portrait {
        width: 56px;
        height: 56px;
    }

    body.home-page .hero__scene--inline .hero__matcha-img {
        width: 1.6em;
    }

    .project-card__title {
        font-size: 17px;
    }

    .work-filter {
        padding: 3px;
        gap: 2px;
    }

    .work-filter__tab {
        font-size: 0.75rem;
        letter-spacing: 0.01em;
        padding: 7px 8px;
        line-height: 1.25;
        min-height: 32px;
    }
}


/* ===== Second Wind Pro case study (scoped) ===== */
.case-study--swp {
    position: relative;
    overflow: visible;
    width: 100%;
    box-sizing: border-box;
}

.case-study--swp .case-study__section,
.case-study--swp .case-study__conclusion,
.case-study--swp .cs-outline-anchor {
    scroll-margin-top: 122px;
}

/* Two-column case study: sticky TOC | title + meta + article */
.case-study--swp .cs-toc-body {
    display: flex;
    flex-direction: column;
    width: 100%;
    overflow: visible;
}

.case-study--swp .cs-toc-article {
    min-width: 0;
    overflow: visible;
}

.case-study--swp .cs-toc {
    order: 2;
    margin: 0 0 32px;
    padding: 0;
    background: transparent;
}

.case-study--swp .cs-toc__details {
    margin: 0;
}

.case-study--swp .cs-toc__summary {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 0 0 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    color: #8c8c88;
    list-style: none;
    user-select: none;
}

.case-study--swp .cs-toc__summary::-webkit-details-marker,
.case-study--swp .cs-toc__summary::marker {
    display: none;
    content: '';
}

.case-study--swp .cs-toc__summary::before {
    content: '';
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 4px 0 4px 5px;
    border-color: transparent transparent transparent #8c8c88;
    transform: rotate(0deg);
    transition: transform 0.15s ease;
    flex-shrink: 0;
}

.case-study--swp .cs-toc__details[open] .cs-toc__summary::before {
    transform: rotate(90deg);
}

.case-study--swp .cs-toc__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.case-study--swp .cs-toc__item {
    border-bottom: 1px solid #eee;
}

.case-study--swp .cs-toc__link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 0 11px 8px;
    color: #5f5e5a;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.4;
    text-decoration: none;
    transition: color 0.15s ease, font-weight 0.15s ease;
}

.case-study--swp .cs-toc__icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: #8c8c88;
}

.case-study--swp .cs-toc__label {
    min-width: 0;
}

.case-study--swp .cs-toc__link:hover {
    color: #3d3d3a;
}

.case-study--swp .cs-toc__link:hover .cs-toc__icon {
    color: #5f5e5a;
}

.case-study--swp .cs-toc__link.is-active {
    color: #191919;
    font-weight: 600;
    background: transparent;
}

.case-study--swp .cs-toc__link.is-active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    bottom: 10px;
    width: 1.5px;
    background: #191919;
    border-radius: 1px;
}

.case-study--swp .cs-toc__link.is-active .cs-toc__icon {
    color: #191919;
}

.case-study--swp .cs-toc__link:focus {
    outline: none;
}

.case-study--swp .cs-toc__link:focus-visible {
    outline: 2px solid #191919;
    outline-offset: 3px;
}

.case-study--swp .cs-toc-article > .case-study__hero-section {
    order: 1;
    margin-top: 0;
    margin-bottom: 40px;
}

.case-study--swp .cs-toc-article > .case-study__hero-section + .case-study__section,
.case-study--swp .cs-toc-article > .case-study__section:first-child {
    margin-top: 0;
}

@media (max-width: 1079px) {
    .case-study--swp .cs-toc-article {
        display: contents;
    }

    .case-study--swp .cs-toc-article > .case-study__section,
    .case-study--swp .cs-toc-article > .case-study__conclusion,
    .case-study--swp .cs-toc-article > .case-study__related {
        order: 3;
    }

    /* Phone + tablet: drop Contents so it doesn't sit between title and article. */
    .case-study--swp .cs-toc {
        display: none;
        margin: 0;
    }

    /* Flex items don't collapse margins; --spaced was stacking 50+48. */
    .case-study--swp .case-study__section--spaced {
        margin-bottom: 0;
    }
}

@media (min-width: 1080px) {
    .case-study--swp {
        max-width: 1120px;
        /* Horizontal inset comes from shared .case-study (--site-gutter) */
    }

    .case-study--swp .cs-toc-body {
        display: grid;
        grid-template-columns: 228px minmax(0, 1fr);
        column-gap: 64px;
        align-items: start;
    }

    .case-study--swp .cs-toc {
        order: unset;
        position: sticky;
        top: 48px; /* matches case-study padding-top; header chrome removed */
        z-index: 0;
        align-self: start;
        margin: 0;
        max-height: calc(100vh - 72px);
        overflow-x: clip;
        overflow-y: auto;
        scrollbar-width: thin;
        scrollbar-color: rgba(0, 0, 0, 0.18) transparent;
    }

    .case-study--swp .cs-toc__summary {
        pointer-events: none;
        cursor: default;
        padding-bottom: 12px;
    }

    .case-study--swp .cs-toc__summary::before {
        display: none;
    }

    .case-study--swp .cs-toc-article {
        min-width: 0;
    }

    .case-study--swp .cs-toc-article > .case-study__hero-section {
        order: unset;
        margin-top: 0;
    }
}

.case-study--swp .case-study__hero-section {
    margin-top: 0;
}

/* Sticky header is in flow — no extra main offset. 48px padding (not margin)
   so Contents and the H1 share the same air under the nav hairline. */
body.case-study-page .main {
    margin-top: 0;
    min-height: 100vh;
}

body.case-study-page .case-study {
    margin-top: 0;
    padding-top: 48px;
}

/* Banner pages keep case-study padding-top 0; gap lives on the banner itself.
   When a shared Back control sits above the banner, keep a small top strip. */
body.case-study-page .case-study:has(> .case-study__hero-banner) {
    padding-top: 0;
}

body.case-study-page .case-study:has(> .case-study__back + .case-study__hero-banner) {
    padding-top: 48px;
}

/* Version 1 continues the Claude artifact — don't treat it as a new chapter. */
.case-study--swp #process.case-study__section--spaced {
    margin-bottom: 0;
}

.case-study--swp #process .swp-chat:last-child {
    margin-bottom: 0;
}

.case-study--swp #version-1 {
    margin-top: 48px;
}

.case-study--swp #version-1 > .case-study__section-title {
    margin-top: 0;
    margin-bottom: 12px;
}

.case-study--swp .case-study__placeholder {
    margin: 28px 0 8px;
    max-width: 100%;
    min-height: 280px;
    height: auto;
    padding: 48px 24px;
    background: #f6f5f2;
    border: 1.5px dashed #cfc9c0;
    color: #5c574f;
    box-sizing: border-box;
}

.case-study--swp .case-study__placeholder--large {
    min-height: 320px;
}

.case-study--swp .case-study__placeholder-title {
    color: #333;
    font-style: normal;
}

.case-study--swp .case-study__placeholder-subtitle {
    color: #6b665e;
    font-style: normal;
}

.case-study--swp .case-study__section-text + .case-study__section-text {
    margin-top: 18px;
}

/* Live site browser mockup */
.case-study--swp .swp-browser {
    margin: 28px 0 12px;
    width: 100%;
    max-width: 100%;
    border: 1px solid #e0e0e0;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.06);
}

.case-study--swp .swp-browser__chrome {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: #f3f1ec;
    border-bottom: 1px solid #e6e2da;
}

.case-study--swp .swp-browser__traffic {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.case-study--swp .swp-browser__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.case-study--swp .swp-browser__dot--close { background: #d9d3c8; }
.case-study--swp .swp-browser__dot--minimize { background: #d9d3c8; }
.case-study--swp .swp-browser__dot--zoom { background: #d9d3c8; }

.case-study--swp .swp-browser__url {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #e4e0d8;
    color: #555;
    font-size: 13px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.case-study--swp .swp-browser__lock {
    display: inline-flex;
    color: #8a8478;
    flex-shrink: 0;
}

.case-study--swp .swp-browser__open {
    flex-shrink: 0;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    text-decoration: none;
    white-space: nowrap;
}

.case-study--swp .swp-browser__open:hover {
    text-decoration: underline;
}

.case-study--swp .swp-browser__viewport {
    position: relative;
    width: 100%;
    height: min(720px, 78vh);
    background: #fafafa;
    overflow: hidden;
}

/* v1 Claude home: live hero is height:100vh; min-height:720px at a laptop
   crop (~1440×800), not a tall 100vh inside a scaled iframe. Size the
   chrome to that proportion so the navbar-to-footer-of-hero composition matches. */
.case-study--swp .swp-browser--v1-home .swp-browser__viewport {
    height: auto;
    aspect-ratio: 1440 / 800;
}

/* v2 live home: 16:10 laptop crop so the 100vh hero (flex-centered
   headline) sits in the middle of the chrome, like a real laptop. */
.case-study--swp .swp-browser--v2-home .swp-browser__viewport {
    height: auto;
    aspect-ratio: 16 / 10;
    background: #0d0e1a;
}

.case-study--swp .swp-browser__scaler {
    position: absolute;
    top: 0;
    left: 0;
    width: 1440px;
    height: 100%;
    transform: scale(var(--swp-embed-scale, 1));
    transform-origin: top left;
    pointer-events: auto;
}

.case-study--swp .swp-browser--services .swp-browser__scaler {
    width: 1100px;
}

.case-study--swp .swp-browser--v1-services .swp-browser__scaler {
    width: 1440px;
}

.case-study--swp .swp-browser__iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    background: #fff;
    pointer-events: auto;
}

/* Section embeds: services iframes load a same-origin proxy that
   isolates the full #services section (v1 heading + track, v2 02/head + stack).
   Athletes still uses crop-y to hide the live sticky nav. */
.case-study--swp .swp-browser--section .swp-browser__viewport {
    overflow: hidden;
    background: #0c0814;
}

.case-study--swp .swp-browser--section .swp-browser__iframe {
    height: calc(100% + (var(--swp-crop-y, 0) * 1px));
    transform: translateY(calc(var(--swp-crop-y, 0) * -1px));
}

.case-study--swp .swp-browser--section .swp-browser__viewport::before,
.case-study--swp .swp-browser--section .swp-browser__viewport::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    z-index: 2;
    pointer-events: none;
}

.case-study--swp .swp-browser--section .swp-browser__viewport::before {
    top: 0;
    height: 28px;
    background: linear-gradient(to bottom, rgba(8, 6, 18, 0.45), transparent);
}

.case-study--swp .swp-browser--section .swp-browser__viewport::after {
    bottom: 0;
    height: 48px;
    background: linear-gradient(to top, rgba(8, 6, 18, 0.55), transparent);
}

/* Services interaction fills the chrome; no fade masks. */
.case-study--swp .swp-browser--services .swp-browser__viewport::before,
.case-study--swp .swp-browser--services .swp-browser__viewport::after {
    display: none;
}

.case-study--swp .swp-browser--services .swp-browser__viewport {
    background: #0d0e1a;
    height: min(820px, 82vh);
}

/* v1 services: 16:10 laptop crop so nav + “What We Do” + cards sit in
   the middle of the chrome, not jammed under the sticky bar. */
.case-study--swp .swp-browser--v1-services .swp-browser__viewport {
    height: auto;
    aspect-ratio: 16 / 10;
    background: #0c0814;
}

.case-study--swp .swp-browser--services-hook .swp-browser__viewport {
    height: min(620px, 68vh);
}

/* Sandbox walkthrough: browser chrome around the local recording. */
.case-study--swp .swp-browser--player .swp-browser__viewport {
    position: relative;
    height: auto;
    aspect-ratio: auto;
    background: #111;
    display: block;
    overflow: hidden;
}

.case-study--swp .swp-browser--player .case-study__placeholder {
    margin: 0;
    max-width: none;
    width: 100%;
    height: auto;
    min-height: 0;
    padding: 32px 24px;
    border: none;
    border-radius: 0;
    background: transparent;
}

.case-study--swp .swp-browser--player video,
.case-study--swp .swp-browser--player .swp-browser__video {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    background: #111;
    border: 0;
}

/* Agent-style color tag chip */
.case-study--swp .swp-color-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    vertical-align: middle;
    margin: 0 2px;
    padding: 2px 8px 2px 3px;
    border-radius: 6px;
    border: 1px solid #e4e0d8;
    background: #f7f5f1;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03);
    line-height: 1;
    white-space: nowrap;
}

.case-study--swp .swp-color-tag__swatch {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 3px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    flex-shrink: 0;
}

.case-study--swp .swp-color-tag__hex {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.82em;
    font-weight: 560;
    letter-spacing: 0.02em;
    color: #2f2a24;
    background: transparent;
    padding: 0;
}

/* LLM chat mockups */
.case-study--swp .swp-chat {
    margin: 28px 0;
    border: 1px solid #e4e0d8;
    border-radius: 14px;
    overflow: hidden;
    background: #fbfaf7;
}

.case-study--swp .swp-chat__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid #ebe7df;
    background: #f4f1eb;
}

.case-study--swp .swp-chat__brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.case-study--swp .swp-chat__logo {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    display: block;
    object-fit: contain;
}

.case-study--swp .swp-chat__model {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    letter-spacing: 0.01em;
}

.case-study--swp .swp-chat__meta {
    font-size: 12px;
    color: #7a7468;
}

.case-study--swp .swp-chat__thread {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 18px 16px 20px;
}

.case-study--swp .swp-chat__row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-width: 92%;
}

.case-study--swp .swp-chat__row--user {
    align-self: flex-end;
    align-items: flex-end;
}

.case-study--swp .swp-chat__row--assistant {
    align-self: flex-start;
    align-items: flex-start;
}

.case-study--swp .swp-chat__row--artifact {
    max-width: 100%;
    width: 100%;
    align-self: stretch;
    align-items: stretch;
}

.case-study--swp .swp-chat__artifact {
    min-width: 0;
}

.case-study--swp .swp-chat__artifact .swp-browser {
    margin: 0;
}

.case-study--swp .swp-chat__label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #8a8478;
}

.case-study--swp .swp-chat__label-logo {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    display: block;
    object-fit: contain;
}

.case-study--swp .swp-chat__bubble {
    padding: 14px 16px;
    border-radius: 14px;
    font-size: 15px;
    line-height: 1.55;
    font-style: normal;
}

.case-study--swp .swp-chat__bubble--user {
    background: #2f2a24;
    color: #f7f4ef;
    border-bottom-right-radius: 4px;
}

.case-study--swp .swp-chat__bubble--assistant {
    background: #fff;
    color: #444;
    border: 1px solid #e6e2da;
    border-bottom-left-radius: 4px;
}

.case-study--swp .swp-chat__assistant-status {
    color: #666;
    font-size: 14px;
}

.case-study--swp .swp-chat--claude {
    background: #f7f3ee;
    border-color: #eadfd4;
}

.case-study--swp .swp-chat--claude .swp-chat__header {
    background: #f3ebe3;
    border-bottom-color: #e6d9cc;
}

.case-study--swp .swp-chat--claude .swp-chat__logo {
    color: #d97757;
}

.case-study--swp .swp-chat--claude .swp-chat__model {
    color: #c45c38;
    font-weight: 650;
    letter-spacing: -0.02em;
}

.case-study--swp .swp-chat--claude .swp-chat__meta {
    color: #9a8070;
}

.case-study--swp .swp-chat--claude .swp-chat__label {
    color: #b08978;
}

.case-study--swp .swp-chat--claude .swp-chat__label-logo {
    color: #d97757;
}

.case-study--swp .swp-chat--claude .swp-chat__bubble--user {
    background: #3d3229;
    color: #f7f1ea;
}

.case-study--swp .swp-chat--claude .swp-chat__bubble--assistant {
    background: #fff8f3;
    color: #3d3229;
    border-color: #ead9cc;
    box-shadow: inset 3px 0 0 #d97757;
}

.case-study--swp .swp-chat--chatgpt {
    background: #fff;
    border-color: #e5e5e5;
}

.case-study--swp .swp-chat--chatgpt .swp-chat__header {
    background: #171717;
    border-bottom-color: #171717;
}

.case-study--swp .swp-chat--chatgpt .swp-chat__logo {
    color: #fff;
}

.case-study--swp .swp-chat--chatgpt .swp-chat__model {
    color: #fff;
    font-weight: 650;
    letter-spacing: -0.03em;
}

.case-study--swp .swp-chat--chatgpt .swp-chat__meta {
    color: #8fbfa8;
}

.case-study--swp .swp-chat--chatgpt .swp-chat__label {
    color: #8e8e8e;
    text-transform: none;
    letter-spacing: 0;
}

.case-study--swp .swp-chat--chatgpt .swp-chat__label-logo {
    color: #10a37f;
}

.case-study--swp .swp-chat--chatgpt .swp-chat__bubble--user {
    background: #f4f4f4;
    color: #0d0d0d;
}

.case-study--swp .swp-chat--chatgpt .swp-chat__bubble--assistant {
    background: #fff;
    color: #0d0d0d;
    border-color: #e8e8e8;
    box-shadow: inset 3px 0 0 #10a37f;
}

.case-study--swp .swp-chat--chatgpt .swp-chat__assistant-status {
    color: #444;
}

.case-study--swp .swp-brand-chips {
    display: inline;
    vertical-align: middle;
    margin: 0 1px;
    white-space: nowrap;
}

.case-study--swp .swp-brand-punct {
    display: inline;
    margin: 0;
    font-size: inherit;
    font-weight: 400;
    line-height: inherit;
    color: inherit;
    white-space: pre;
}

.case-study--swp .swp-brand-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    margin: 0;
    padding: 3px 6px;
    border-radius: 5px;
    border: 1px solid #e4e0d8;
    background: #fff;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03);
    line-height: 0;
}

.case-study--swp .swp-brand-chip__logo {
    display: block;
    height: 18px;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
}

.case-study--swp .swp-brand-chip__logo--nike {
    height: 22px;
}

.case-study--swp .swp-brand-chip__logo--ncaa {
    height: 18px;
}

.case-study--swp .swp-brand-chip__logo--espn {
    height: 18px;
}

.case-study--swp .swp-modern {
    font-family: Geist, sans-serif;
    font-weight: 700;
    font-style: normal;
    letter-spacing: -0.03em;
}

/* Stakeholder insight cards (distinct from .case-study__quote) */
.case-study--swp .swp-insight-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin: 36px 0 8px;
}

.case-study--swp .swp-insight {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0;
    border-radius: 12px;
    overflow: visible;
    background: #fff;
    border: 1px solid #e5e1d8;
}

.case-study--swp .swp-insight__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid transparent;
    border-radius: 12px 12px 0 0;
}

.case-study--swp .swp-insight__role {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.case-study--swp .swp-insight__name {
    font-size: 15px;
    font-weight: 600;
}

.case-study--swp .swp-insight__context {
    margin: 0;
    padding: 0 18px;
    font-size: 13px;
    line-height: 1.4;
    color: #6b665e;
}

.case-study--swp .swp-insight__quote {
    margin: 0;
    padding: 4px 18px 20px;
    font-size: 16px;
    line-height: 1.55;
    font-style: normal;
    font-weight: 400;
    color: #333;
    border: 0;
}

.case-study--swp .swp-insight--jack .swp-insight__header {
    background: #eef3f1;
    border-bottom-color: #d7e3dd;
}

.case-study--swp .swp-insight--jack .swp-insight__role {
    color: #3d6b57;
}

.case-study--swp .swp-insight--jack .swp-insight__name {
    color: #24352d;
}

.case-study--swp .swp-insight--luke .swp-insight__header {
    background: #f3efe8;
    border-bottom-color: #e4dccf;
}

.case-study--swp .swp-insight--luke .swp-insight__role {
    color: #7a5c2e;
}

.case-study--swp .swp-insight--luke .swp-insight__name {
    color: #3a2f1c;
}

@media (max-width: 768px) {
    /* Phone: one gap between sections — desktop --spaced stacks 50+48. */
    .case-study--swp .cs-toc-article > .case-study__hero-section,
    .case-study--swp .case-study__hero-section {
        margin-top: 0;
        margin-bottom: 24px;
    }

    .case-study--swp #version-1 {
        margin-top: 28px;
    }

    .case-study--swp #version-1 > .case-study__section-title {
        margin-bottom: 8px;
    }

    .case-study--swp .case-study__section {
        margin-top: 32px;
        margin-bottom: 0;
    }

    .case-study--swp .cs-toc-article > .case-study__hero-section + .case-study__section,
    .case-study--swp .cs-toc-article > .case-study__section:first-child {
        margin-top: 0;
    }

    .case-study--swp .case-study__section--spaced {
        margin-top: 40px;
        margin-bottom: 0;
    }

    .case-study--swp .case-study__section-title {
        margin-top: 8px;
        margin-bottom: 12px;
    }

    .case-study--swp .case-study__subsection-title {
        margin-top: 20px;
        margin-bottom: 8px;
    }

    .case-study--swp .case-study__subsection-title--spaced,
    .case-study--swp .case-study__section-title--spaced {
        margin-top: 28px;
    }

    .case-study--swp .case-study__section-text + .case-study__section-text {
        margin-top: 12px;
    }

    .case-study--swp .case-study__section-text + .case-study__section-image,
    .case-study--swp .case-study__section-list + .case-study__section-image {
        margin-top: 16px;
    }

    .case-study--swp .case-study__section-list {
        margin: 12px 0;
    }

    .case-study--swp .case-study__section-list li {
        margin-bottom: 10px;
    }

    .case-study--swp .case-study__section-image {
        margin: 16px 0 8px;
    }

    .case-study--swp .case-study__section-caption {
        margin-top: 8px;
        margin-bottom: 0;
    }

    .case-study--swp .swp-browser {
        margin: 16px 0 8px;
    }

    .case-study--swp .case-study__placeholder {
        margin: 16px 0 8px;
        padding: 32px 16px;
        min-height: 180px;
    }

    .case-study--swp .case-study__conclusion {
        margin-top: 48px;
    }

    /* Phone: live SWP at its own mobile CSS — no laptop chrome, no 1440 scale. */
    .case-study--swp .swp-browser:not(.swp-browser--player) .swp-browser__chrome {
        display: none;
    }

    .case-study--swp .swp-browser__scaler {
        width: 100% !important;
        height: 100% !important;
        transform: none;
    }

    .case-study--swp .swp-browser--section .swp-browser__iframe {
        height: 100%;
        transform: none;
    }

    .case-study--swp .swp-browser__viewport {
        height: min(560px, 68vh);
    }

    .case-study--swp .swp-browser--v1-home .swp-browser__viewport {
        height: min(560px, 68vh);
        aspect-ratio: auto;
    }

    .case-study--swp .swp-browser--v2-home .swp-browser__viewport {
        height: min(680px, 84vh);
        aspect-ratio: auto;
    }

    .case-study--swp .swp-browser--services .swp-browser__viewport {
        height: min(580px, 70vh);
    }

    .case-study--swp .swp-browser--v1-services .swp-browser__viewport {
        height: min(680px, 84vh);
        aspect-ratio: auto;
    }

    .case-study--swp .swp-browser--services-hook .swp-browser__viewport {
        height: min(560px, 68vh);
    }

    .case-study--swp .swp-browser--player .swp-browser__viewport {
        height: auto;
        aspect-ratio: auto;
    }

    .case-study--swp .swp-chat__row {
        max-width: 100%;
    }

    .case-study--swp .swp-insight-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .case-study--swp .swp-browser__viewport {
        height: min(520px, 64vh);
    }

    .case-study--swp .swp-browser--v1-home .swp-browser__viewport {
        height: min(520px, 64vh);
        aspect-ratio: auto;
    }

    .case-study--swp .swp-browser--v2-home .swp-browser__viewport {
        height: min(640px, 80vh);
        aspect-ratio: auto;
    }

    .case-study--swp .swp-browser--services .swp-browser__viewport {
        height: min(540px, 66vh);
    }

    .case-study--swp .swp-browser--v1-services .swp-browser__viewport {
        height: min(640px, 80vh);
        aspect-ratio: auto;
    }

    .case-study--swp .swp-browser--services-hook .swp-browser__viewport {
        height: min(520px, 64vh);
    }

    .case-study--swp .swp-browser--player .swp-browser__viewport {
        height: auto;
        aspect-ratio: auto;
    }

    .case-study--swp .swp-browser__open {
        font-size: 12px;
    }
}

/* AyoLLM — RacheLLM-style ask panel, in this site's light chrome */
.ayo-llm {
    --ayo-llm-field: #fafafa;
    position: relative;
    z-index: 10020;
    font-family: Inter, "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.ayo-llm__launch {
    position: fixed;
    right: var(--side-rail-right);
    bottom: var(--page-bound-bottom);
    z-index: 10021;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    padding: 0;
    border: 1px solid var(--hairline);
    border-radius: 14px;
    background: #fafafa;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.ayo-llm__launch:hover {
    background: #fafafa;
    box-shadow: none;
}

.ayo-llm__launch:hover img {
    filter: brightness(1.08);
}

.ayo-llm__launch:focus-visible {
    outline: 2px solid rgba(107, 70, 193, 0.45);
    outline-offset: 2px;
}

.ayo-llm[data-open="true"] .ayo-llm__launch {
    visibility: hidden;
    pointer-events: none;
}

.ayo-llm__panel {
    position: fixed;
    right: var(--side-rail-right);
    bottom: var(--page-bound-bottom);
    z-index: 10022;
    display: flex;
    flex-direction: column;
    width: min(392px, calc(100vw - var(--side-rail-right) - 24px));
    height: min(560px, calc(100dvh - var(--page-bound-bottom) - 24px));
    border: 1px solid var(--hairline);
    border-radius: 16px;
    background: #fff;
    box-shadow: 4px 16px 40px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translate3d(0, 12px, 0);
    transition: opacity 0.22s var(--nav-ease-slide), transform 0.22s var(--nav-ease-slide);
}

.ayo-llm[data-open="true"] .ayo-llm__panel {
    opacity: 1;
    pointer-events: auto;
    transform: translate3d(0, 0, 0);
}

.ayo-llm__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 14px 10px;
    background: #fff;
    border-bottom: 1px solid var(--hairline);
}

.ayo-llm__brand {
    display: flex;
    align-items: center;
    min-width: 0;
}

.ayo-llm__launch img,
.ayo-llm__brand img {
    display: block;
    object-fit: contain;
    flex-shrink: 0;
}

.ayo-llm__launch img {
    width: 26px;
    height: 26px;
}

.ayo-llm__brand img {
    width: 28px;
    height: 28px;
}

.ayo-llm__chip img {
    display: none;
}

.ayo-llm__top-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.ayo-llm__icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #333;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.ayo-llm__icon-btn svg {
    display: block;
    flex-shrink: 0;
}

.ayo-llm__icon-btn:hover,
.ayo-llm__icon-btn:focus-visible {
    background: rgba(0, 0, 0, 0.06);
    color: #111;
}

.ayo-llm__icon-btn:focus-visible {
    outline: 2px solid rgba(107, 70, 193, 0.45);
    outline-offset: 1px;
}

.ayo-llm__log {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 20px 18px 8px;
}

.ayo-llm__log:has(.ayo-llm__hello) {
    justify-content: center;
}

.ayo-llm__hello {
    margin: 0;
    width: 100%;
}

.ayo-llm__hello-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    cursor: default;
}

.ayo-llm__hello-title {
    margin: 0;
    font-family: "Mercury Display", Georgia, serif;
    font-size: 28px;
    font-weight: 500;
    font-style: italic;
    line-height: 1.15;
    color: #111;
    letter-spacing: -0.02em;
    cursor: default;
}

.ayo-llm__hello-copy {
    margin: 0;
    max-width: 32em;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.45;
    color: #737373;
    cursor: default;
    text-wrap: pretty;
}

.ayo-llm__chips {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    margin-top: 20px;
    width: 100%;
}

.ayo-llm__chip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    margin: 0;
    padding: 8px 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #111;
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    user-select: none;
    transition: color 0.18s ease, opacity 0.18s ease;
}

.ayo-llm__chip-label {
    min-width: 0;
}

.ayo-llm__chip-arrow {
    display: block;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    color: #737373;
    transform: translateX(0);
    transition: transform 0.18s ease, color 0.18s ease;
}

.ayo-llm__chip:hover,
.ayo-llm__chip:focus-visible,
.ayo-llm__chip:active,
.ayo-llm__chip.ayo-llm__chip--picked {
    color: #6B46C1;
    text-decoration: none;
}

.ayo-llm__chip:hover .ayo-llm__chip-arrow,
.ayo-llm__chip:focus-visible .ayo-llm__chip-arrow,
.ayo-llm__chip:active .ayo-llm__chip-arrow,
.ayo-llm__chip.ayo-llm__chip--picked .ayo-llm__chip-arrow {
    color: currentColor;
    transform: translateX(4px);
}

.ayo-llm__chip:focus-visible {
    outline: 2px solid rgba(107, 70, 193, 0.45);
    outline-offset: 2px;
}

.ayo-llm__chip.ayo-llm__chip--idle {
    opacity: 0.38;
    pointer-events: none;
}

.ayo-llm__msg {
    max-width: 100%;
    margin: 0 0 14px;
    font-size: 14px;
    line-height: 1.55;
}

.ayo-llm__msg p {
    margin: 0 0 0.7em;
}

.ayo-llm__msg p:last-child {
    margin-bottom: 0;
}

.ayo-llm__msg--user {
    margin-left: 28px;
    padding: 10px 12px;
    border-radius: 12px 12px 4px 12px;
    background: #eee;
    color: #111;
}

.ayo-llm__msg--bot {
    color: #222;
}

.ayo-llm__msg a {
    color: #6B46C1;
}

.ayo-llm__msg--error {
    color: #8a3b3b;
}

.ayo-llm__form {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 10px 12px 12px;
    border-top: 1px solid var(--hairline);
    background: #fff;
}

.ayo-llm__input {
    flex: 1;
    min-height: 40px;
    max-height: 96px;
    resize: none;
    border: 1px solid var(--hairline);
    border-radius: 12px;
    padding: 10px 12px;
    font: inherit;
    font-size: 14px;
    background: var(--ayo-llm-field);
    color: #111;
}

.ayo-llm__input:focus {
    outline: 2px solid rgba(107, 70, 193, 0.45);
    outline-offset: 1px;
}

.ayo-llm__send {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #6B46C1;
    color: #fff;
    cursor: pointer;
    flex-shrink: 0;
    appearance: none;
    -webkit-appearance: none;
}

.ayo-llm__send:disabled {
    opacity: 0.4;
    cursor: default;
}

.ayo-llm__send svg {
    display: block;
    margin: 0;
}

body.ayo-llm-open #back-to-top,
body.ayo-llm-open .side-rail {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

@media (max-width: 640px) {
    .ayo-llm__panel {
        width: min(392px, calc(100vw - var(--side-rail-right) - 16px));
        height: min(640px, calc(100dvh - var(--page-bound-bottom) - 12px));
        border-radius: 16px;
    }

    .ayo-llm__hello-title {
        font-size: 24px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ayo-llm__panel,
    .ayo-llm__chip,
    .ayo-llm__chip-arrow {
        transition: none;
    }
}

/* ==========================================================================
   Control Center board — opaque squircles, one project per cell
   Materials are solid. No glass, blur, or --cc tokens.
   ========================================================================== */
.cc-board {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: auto;
    gap: 18px 14px;
    width: 100%;
    max-width: var(--site-max-width);
    margin: 0 auto;
    padding: 20px var(--content-inset) 12px;
    box-sizing: border-box;
}

.cc-board--foot {
    padding-top: 0;
    padding-bottom: 0;
    grid-auto-rows: minmax(72px, auto);
}

.cc-mod {
    min-width: 0;
    min-height: 0;
    box-sizing: border-box;
    background: var(--module-bg);
    border: 1px solid var(--hairline);
    border-radius: var(--module-radius);
    corner-shape: superellipse(1.6);
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    color: var(--text);
}

.cc-mod--hero {
    grid-column: 1 / -1;
    grid-row: 1;
    display: flex;
    align-items: stretch;
    min-height: 220px;
    padding: 28px 28px 30px;
}

.cc-app {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    min-width: 0;
    min-height: 0;
    text-decoration: none;
    color: inherit;
    background: none;
    border: 0;
    box-shadow: none;
}

.cc-app--guild {
    grid-column: 1 / 3;
    grid-row: 2;
}

.cc-app--job {
    grid-column: 3 / 5;
    grid-row: 2;
}

.cc-app--baseball {
    grid-column: 1 / 3;
    grid-row: 3;
}

.cc-app--swp {
    grid-column: 3 / 5;
    grid-row: 3;
}

.cc-app .cc-mod--project,
.cc-app .project-card {
    flex: 0 0 auto;
    width: 100%;
    min-height: 0;
    height: auto;
    margin: 0;
    padding: 0;
    gap: 0;
    background: var(--module-bg);
    border: 0;
    overflow: hidden;
}

.cc-app .project-card__image-container {
    position: relative;
    aspect-ratio: 16 / 10;
    flex: none;
    width: 100%;
    height: auto;
    min-height: 0;
    border-radius: 0;
}

.cc-app--guild .project-card__image-container,
.cc-app--job .project-card__image-container {
    aspect-ratio: 4 / 3;
}

.cc-app--guild .project-card__image {
    object-fit: cover;
    object-position: center top;
}

.cc-app .project-card__image-container--jq .jq-motion {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #fffce1;
}

.cc-app .project-card__image-container--jq .jq-motion__overlay {
    z-index: 1;
}

.cc-app--guild .project-card__image-container::after,
.cc-app--job .project-card__image-container::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 4;
    pointer-events: none;
    background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, 0.34) 50%, transparent 65%);
    transform: translateX(-130%);
}

.cc-app__meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 2px 6px 0;
    min-width: 0;
}

.cc-app__label {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, Helvetica, sans-serif;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.015em;
    color: var(--text);
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cc-app__desc {
    margin: 0;
    font-family: Inter, Helvetica, sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.4;
    letter-spacing: -0.011em;
    color: var(--text-muted);
    text-wrap: pretty;
}

@media (hover: hover) and (pointer: fine) {
    .cc-app:hover .project-card__image-container {
        transform: translateY(-3px);
        box-shadow: 4px 8px 12px rgba(0, 0, 0, 0.06);
    }

    .cc-app:hover .project-card__image {
        transform: scale(1.04);
    }

    .cc-app:hover .project-card__image-container--jq .jq-motion__overlay {
        transform: scale(1.03);
    }

    .cc-app--guild:hover .project-card__image-container::after,
    .cc-app--job:hover .project-card__image-container::after {
        animation: cc-shine 0.72s ease;
    }
}

@keyframes cc-shine {
    to {
        transform: translateX(130%);
    }
}

.cc-app:focus-visible {
    outline: none;
}

.cc-app:focus-visible .cc-mod--project {
    outline: 2px solid #6B46C1;
    outline-offset: 3px;
}

.cc-app--about .cc-mod--about {
    flex: 1 1 auto;
    min-height: 148px;
    height: 100%;
}

.cc-mod--toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 16px 18px 18px;
    text-decoration: none;
    color: var(--text);
    background: var(--module-bg-soft);
    transition: transform 0.16s ease, background 0.16s ease;
}

.cc-mod--on {
    background: #6B46C1;
    border-color: #5b3aa8;
    color: #fff;
}

.cc-mod--toggle:hover {
    transform: scale(0.985);
}

.cc-mod--toggle:focus-visible {
    outline: 2px solid #6B46C1;
    outline-offset: 3px;
}

.cc-mod__kicker {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, Helvetica, sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    opacity: 0.55;
}

.cc-mod--on .cc-mod__kicker {
    opacity: 0.78;
    color: #fff;
}

.cc-mod__name {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, Helvetica, sans-serif;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.15;
    text-wrap: balance;
}

.cc-mod--mail,
.cc-mod--made {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px 22px;
    margin: 0;
    background: var(--module-bg);
    color: var(--text);
}

.cc-mod--mail {
    grid-column: 1 / 3;
}

.cc-mod--made {
    grid-column: 3 / 5;
}

body.home-page .hero.cc-mod--hero {
    position: relative;
    isolation: isolate;
    flex: none;
    min-height: 240px;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 28px 28px 30px;
    justify-content: flex-end;
    align-items: stretch;
}

body.home-page .hero.cc-mod--hero .hero__content {
    justify-content: flex-end;
}

body.home-page .hero.cc-mod--hero .hero__title-lead {
    font-size: clamp(28px, 3.4vw, 42px);
    line-height: 1.12;
    color: var(--text);
}

body.home-page .hero.cc-mod--hero .hero__title-intro {
    font-size: 16px;
    color: var(--text-muted);
}

body.home-page #work {
    scroll-margin-top: calc(var(--header-offset) + 12px);
}

body.home-page .cc-board--foot .footer__contact,
body.home-page .cc-board--foot .footer__made-with {
    width: auto;
    white-space: normal;
    text-align: center;
}

body.home-page .cc-mod--about-hero,
body.about-page .about-hero.cc-mod {
    background: var(--module-bg);
}

@media (max-width: 980px) {
    .cc-board {
        grid-template-columns: 1fr;
        gap: 20px 0;
    }

    .cc-mod--hero {
        grid-column: 1 / -1;
        grid-row: 1;
        min-height: 200px;
        padding: 22px 20px 24px;
    }

    body.home-page .hero.cc-mod--hero {
        padding: 22px 20px 24px;
        min-height: 200px;
    }

    .cc-app--guild,
    .cc-app--job,
    .cc-app--baseball,
    .cc-app--swp {
        grid-column: 1 / -1;
        grid-row: auto;
    }

    .cc-app .project-card__image-container {
        aspect-ratio: 16 / 10;
    }

    .cc-app--guild .project-card__image-container,
    .cc-app--job .project-card__image-container {
        aspect-ratio: 4 / 3;
    }

    .cc-mod--mail,
    .cc-mod--made {
        grid-column: 1 / -1;
        grid-row: auto;
    }
}

@media (max-width: 700px) {
    .cc-board {
        padding: 16px 20px 8px;
        gap: 22px 0;
    }

    body.home-page .hero.cc-mod--hero .hero__title-lead {
        font-size: clamp(26px, 8vw, 34px);
    }

    body.home-page .hero.cc-mod--hero .hero__title-intro {
        font-size: 15px;
    }

    .cc-app__desc {
        font-size: 14px;
        line-height: 1.45;
    }

    .cc-mod__name {
        font-size: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cc-mod--toggle,
    .cc-app .project-card__image-container,
    .cc-app .project-card__image,
    .cc-app .project-card__image-container--jq .jq-motion__overlay {
        transition: none;
    }

    .cc-mod--toggle:hover,
    .cc-app:hover .project-card__image-container,
    .cc-app:hover .project-card__image,
    .cc-app:hover .project-card__image-container--jq .jq-motion__overlay {
        transform: none;
    }

    .cc-app--guild .project-card__image-container::after,
    .cc-app--job .project-card__image-container::after,
    .cc-app--guild:hover .project-card__image-container::after,
    .cc-app--job:hover .project-card__image-container::after {
        animation: none;
        transform: none;
        opacity: 0;
    }
}

/* ==========================================================================
   Home bento — light opaque modules on #fafafa canvas, dense 2-col grid
   Keeps bio-first + project card structure; matches site light materials.
   ========================================================================== */
body.home-page > .main {
    padding-bottom: 8px;
    margin-top: 0;
    padding-top: 52px; /* matches --header-offset / former navbar height */
}

/* ===== Home classic: bio + project list + hover stage ===== */
body.home-page #work.hp-work {
    scroll-margin-top: calc(var(--header-offset) + 12px);
}

.home-classic {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 8px var(--content-inset) 56px;
    box-sizing: border-box;
    font-family: var(--hb-font);
}

/* --- Bio (first viewport composition) --- */
.hp-bio {
    max-width: 560px;
    padding: 12px 0 48px;
}

.hp-bio__top {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 14px;
    margin: 0 0 18px;
}

.hp-bio__avatar {
    display: block;
    width: 64px;
    height: 64px;
    margin: 0;
    border-radius: 50%;
    object-fit: cover;
    object-position: center 18%;
    border: 2px solid var(--hairline);
    background: var(--module-bg-muted);
}

.hp-bio__mark {
    display: block;
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    object-fit: contain;
    transform-origin: center center;
    animation: hb-bio-mark-idle 5.5s ease-in-out infinite;
}

.hp-bio__greeting {
    margin: 0 0 12px;
    font-family: Geist, system-ui, Avenir, Helvetica, Arial, sans-serif;
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.035em;
    text-wrap: balance;
    color: var(--hb-text);
}

.hp-bio__lead,
.hp-bio__more {
    margin: 0;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.55;
    color: var(--hb-muted);
    text-wrap: pretty;
}

.hp-bio__lead {
    margin-bottom: 10px;
}

.hp-bio__more {
    margin-bottom: 22px;
    font-size: 15px;
}

.hp-bio__links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 40px;
    padding: 0 16px;
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.01em;
    text-decoration: none;
    border: 1px solid transparent;
    transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.hb-btn--primary {
    background: var(--hb-accent);
    color: var(--hb-accent-ink);
}

.hb-btn--ghost {
    background: #f5f5f5;
    color: var(--hb-text);
    border-color: #e8e8e8;
}

.hb-btn--ghost:hover {
    background: #ebebeb;
    border-color: #e0e0e0;
}

a.hb-btn:hover {
    transform: translateY(-1px);
}

a.hb-btn:focus-visible {
    outline: 2px solid var(--hb-accent);
    outline-offset: 3px;
}

.hb-bio__tools {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    vertical-align: -6px;
    margin: 0 1px 0 3px;
    padding: 0;
    border: none;
    background: transparent;
    box-sizing: border-box;
}

.hb-bio__tools img {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    display: block;
    border: 1px solid color-mix(in srgb, var(--hb-text) 14%, transparent);
    box-sizing: content-box;
}

@keyframes hb-bio-mark-idle {
    0%, 100% { transform: rotate(0deg) scale(1); }
    45% { transform: rotate(8deg) scale(1.05); }
    70% { transform: rotate(-4deg) scale(1.02); }
}

@media (prefers-reduced-motion: reduce) {
    .hp-bio__mark {
        animation: none;
    }
}

/* --- Work: list + sticky adjacent stage --- */
.hp-work {
    padding-top: 8px;
}

.hp-work__layout {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(500px, 1.3fr);
    gap: 28px 36px;
    align-items: start;
}

.hp-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 1px solid var(--hairline);
}

.hp-list__item {
    margin: 0;
    padding: 0;
    border-bottom: 1px solid var(--hairline);
}

.hp-item {
    display: block;
    padding: 22px 4px 22px 0;
    text-decoration: none;
    color: inherit;
    outline: none;
    transition: opacity 0.18s ease;
}

.hp-item__title {
    margin: 0 0 6px;
    font-size: clamp(18px, 2vw, 22px);
    font-weight: 600;
    letter-spacing: -0.025em;
    line-height: 1.25;
    color: var(--hb-text);
}

.hp-item__desc {
    margin: 0;
    max-width: 42ch;
    font-size: 14px;
    line-height: 1.5;
    color: var(--hb-muted);
    text-wrap: pretty;
}

.hp-item:focus-visible {
    outline: none;
}

.hp-item:focus-visible .hp-item__title {
    outline: 2px solid var(--hb-accent);
    outline-offset: 4px;
    border-radius: 4px;
}

/* Active/hovered/cycled row: name + description full contrast.
   Non-active rows: muted idle look (data-state from JS — reliable with auto-cycle). */
@media (min-width: 821px) {
    .hp-list .hp-item[data-state="idle"] .hp-item__title,
    .hp-list .hp-item:not(.is-active) .hp-item__title {
        color: #b0b0b0;
        font-weight: 500;
    }

    .hp-list .hp-item[data-state="idle"] .hp-item__desc,
    .hp-list .hp-item:not(.is-active) .hp-item__desc {
        color: #c4c4c4;
    }

    .hp-list .hp-item[data-state="active"] .hp-item__title,
    .hp-list .hp-item.is-active .hp-item__title {
        color: #1c1c1e;
        font-weight: 600;
    }

    .hp-list .hp-item[data-state="active"] .hp-item__desc,
    .hp-list .hp-item.is-active .hp-item__desc {
        color: #3a3a3c;
        opacity: 1;
        visibility: visible;
    }
}

/* Mobile-only stacked previews (shown via JS unhide + CSS) */
.hp-item__media {
    display: none;
    margin: 0 0 18px;
    border-radius: 16px;
    overflow: hidden;
    background: var(--module-bg-muted);
    border: 1px solid var(--hairline);
    aspect-ratio: 16 / 10;
}

.hp-item__media img,
.hp-item__media video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hp-item__media--jq {
    background: #fffce1;
    container-type: inline-size;
}

.hp-item__media--jq .jq-motion {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 220px;
    background: #fffce1;
    --jq-scale: calc(100cqi / 1440);
    --jq-ai-home-scale: 0.45;
    --jq-cycle: 16.226s;
}

.hp-item__media--jq .jq-motion__stage {
    left: 50%;
    top: 50%;
    margin-top: 0;
    transform: translate(-50%, -50%) scale(var(--jq-scale));
    transform-origin: center center;
}

.hp-item__media--jq .jq-ai {
    left: 50%;
    top: 50%;
    height: auto;
    max-height: none;
    transform: translate(-50%, -50%) scale(calc(var(--jq-ai-home-scale) / var(--jq-scale)));
    transform-origin: center center;
}

/* Desktop stage */
.hp-stage {
    position: sticky;
    top: calc(var(--header-offset) + 16px);
    align-self: start;
    min-width: 500px;
    min-height: 0;
}

.hp-stage__frame {
    position: relative;
    width: 100%;
    min-width: 500px;
    /* Taller landscape rectangle — more height for motion/video (prefer 4:3 over ultra-wide) */
    aspect-ratio: 4 / 3;
    min-height: 400px;
    border-radius: 18px;
    overflow: hidden;
    background: #f0f0f0;
    border: 1px solid var(--hairline);
    box-shadow: 0 18px 40px rgba(28, 28, 30, 0.08), 0 2px 8px rgba(28, 28, 30, 0.04);
}

.hp-stage__panel {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.hp-stage__panel.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    z-index: 1;
}

.hp-stage__media {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hp-stage__panel--jq {
    background: #fffce1;
    container-type: inline-size;
}

.hp-stage__panel--jq .jq-motion {
    position: absolute;
    inset: 0;
    width: 100%;
    min-width: 500px;
    height: 100%;
    min-height: 400px;
    background: #fffce1;
    --jq-scale: calc(100cqi / 1440);
    /* Wider/taller stage: keep end panel readable inside the frame */
    --jq-ai-home-scale: 0.52;
    --jq-cycle: 16.226s;
}

.hp-stage__panel--jq .jq-motion__overlay {
    z-index: 1;
}

.hp-stage__panel--jq .jq-motion__stage {
    left: 50%;
    top: 50%;
    margin-top: 0;
    transform: translate(-50%, -50%) scale(var(--jq-scale));
    transform-origin: center center;
}

.hp-stage__panel--jq .jq-ai {
    left: 50%;
    top: 50%;
    height: auto;
    max-height: none;
    transform: translate(-50%, -50%) scale(calc(var(--jq-ai-home-scale) / var(--jq-scale)));
    transform-origin: center center;
}

/* Footer */
.hp-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 24px;
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 var(--content-inset);
    box-sizing: border-box;
    font-family: var(--hb-font);
}

.hp-foot__mail,
.hp-foot__made {
    margin: 0;
    font-size: 14px;
    color: var(--hb-muted);
}

.hp-foot__made {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

body.home-page .footer {
    padding-bottom: 28px;
    margin-top: 24px;
}

body.home-page .footer__spotify-logo {
    flex-shrink: 0;
}

body.home-page .hp-foot .footer__email {
    color: var(--hb-text);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

@media (max-width: 980px) {
    .hp-work__layout {
        grid-template-columns: minmax(0, 0.9fr) minmax(500px, 1.15fr);
        gap: 20px 24px;
    }

    .hp-stage__frame {
        min-height: 320px;
    }
}

/* Mobile: stacked media under each row, hide stage */
@media (max-width: 820px) {
    .home-classic {
        padding: 0 20px 40px;
    }

    .hp-bio {
        max-width: none;
        padding: 8px 0 36px;
    }

    .hp-bio__greeting {
        font-size: clamp(26px, 7vw, 34px);
    }

    .hp-work__layout {
        display: block;
    }

    .hp-stage {
        display: none !important;
    }

    .hp-item {
        padding: 20px 0 8px;
    }

    .hp-item__media {
        display: block;
    }

    .hp-foot {
        flex-direction: column;
        align-items: flex-start;
        padding: 0 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hb-btn,
    .hp-item,
    .hp-stage__panel {
        transition: none;
    }

    a.hb-btn:hover {
        transform: none;
    }
}
