/* --- GOOGLE FONTS --- */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,400;0,500;0,600;0,700;0,800;0,900;1,400;1,700&display=swap');

/* --- CSS VARIABLES --- */
:root {
    --bg-color: #ffffff;
    --text-color: #111111;
    --secondary-text: #555555;
    --accent-color: var(--brand);
    --accent-blue: #4A55E0;
    --accent-yellow: #E8E258;
    --projects-more-paint: #e8e258;
    --elevation-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.10);
    --elevation-border: 1px solid #E0E0E0;
    --conversation-bubble-shadow: 5px 6px 0 rgba(0, 0, 0, 0.13);
    --conversation-bubble-shadow-hover: 6px 9px 0 rgba(0, 0, 0, 0.16);
    --accent-blue-soft: rgba(74, 85, 224, 0.08);
    --accent-green-soft: rgba(var(--brand-rgb), 0.07);
    --accent-yellow-soft: rgba(232, 226, 88, 0.14);
    --accent-blue-border: rgba(74, 85, 224, 0.28);
    --accent-yellow-border: rgba(232, 226, 88, 0.42);
    --problem-color: #e74c3c;
    --problem-bg: rgba(231, 76, 60, 0.1);
    --problem-bg-strong: rgba(231, 76, 60, 0.14);
    --problem-border: rgba(231, 76, 60, 0.32);
    --border-color: #e0e0e0;
    --video-shadow: 0 4px 16px rgba(0, 0, 0, 0.1), 0 1px 4px rgba(0, 0, 0, 0.06);
    --video-shadow-dark: 0 4px 20px rgba(0, 0, 0, 0.4), 0 1px 4px rgba(0, 0, 0, 0.25);
    --video-shadow-sides:
        0 -2px 8px rgba(0, 0, 0, 0.05),
        -2px 0 6px rgba(0, 0, 0, 0.04),
        2px 0 6px rgba(0, 0, 0, 0.04),
        0 -1px 2px rgba(0, 0, 0, 0.03);
    --header-height: 0px;
    --mobile-header-height: 0px;
    --footer-height: 50px;
}

[data-theme="dark"] {
    --bg-color: #121212;
    --text-color: #ffffff;
    --secondary-text: #aaaaaa;
    --border-color: #333333;
    --accent-green-soft: rgba(var(--brand-rgb), 0.1);
    --video-shadow-dark: 0 4px 20px rgba(0, 0, 0, 0.4), 0 1px 4px rgba(0, 0, 0, 0.25);
    --video-shadow-sides-dark:
        0 -2px 10px rgba(0, 0, 0, 0.22),
        -2px 0 7px rgba(0, 0, 0, 0.18),
        2px 0 7px rgba(0, 0, 0, 0.18),
        0 -1px 2px rgba(0, 0, 0, 0.14);
}

/* --- RESET & BASE --- */
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Montserrat', sans-serif; transition: background-color 0.3s, color 0.3s; }
/* Site-wide type system: titles (h1–h3) in Archivo, labels/body stay Montserrat.
   Element selectors beat the `*` reset; classed headings that set their own
   font-family (e.g. .mc-case-h1) still win on specificity. */
h1, h2, h3 { font-family: 'Archivo', sans-serif; font-stretch: 82%; }
html, body { overflow-x: hidden; max-width: 100vw; }
body { background-color: var(--bg-color); color: var(--text-color); height: 100vh; overflow: hidden; }

/* Hide Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background-color: var(--accent-color); border-radius: 4px; }

/* --- LAYOUT --- */
#app-root { width: 100%; height: 100%; display: flex; flex-direction: column; }

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

/* Desktop Header — removed */
.site-header,
.mobile-top-bar {
    display: none !important;
}

/* Content Wrapper */
.content-wrapper {
    flex-grow: 1;
    display: flex;
    overflow: hidden;
    height: 100vh;
    --sidebar-width: 30%;
    --panel-width: 70%;
    --sidebar-pad-x: 30px;
    --case-page-pad-x: 48px;
    --project-sidebar-width-percent: 16;
    --project-sidebar-width-extra: 34;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    height: 100%;
    padding: 40px var(--sidebar-pad-x) 40px;
    display: flex; flex-direction: column; justify-content: flex-start;
    border-right: 1px solid var(--border-color); background: var(--bg-color); z-index: 5;
    overflow-x: hidden;
    overflow-y: auto;
    container-type: inline-size;
    container-name: sidebar;
}
.hero-text {
    min-width: 0;
    max-width: 100%;
}
.hero-text h1 {
    font-size: clamp(1.85rem, 11cqi, 2.85rem);
    line-height: 1.12;
    margin-bottom: 13px;
    font-weight: 800;
    font-family: 'Montserrat', sans-serif;
    max-width: 100%;
}
.hero-title-line {
    display: flex;
    flex-wrap: nowrap;
    align-items: baseline;
    gap: 0.14em;
    max-width: 100%;
}
.hero-title-greeting {
    margin: 0 0 12px;
    padding-top: 16px;
    font-size: clamp(1rem, 2vw, 1.2rem);
    font-weight: 700;
    line-height: 1.3;
    color: var(--accent-color);
}
.hero-title-line + .hero-title-line {
    margin-top: 0.06em;
}
.hero-title-line .shape {
    flex-shrink: 0;
    margin-left: 0;
    margin-bottom: 0;
}
.hero-text .sidebar-meta-value { margin-top: 8px; margin-bottom: 8px; font-size: 1.35rem; }
.sidebar-intro-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
}
.sidebar-intro-row .hero-text { flex: 1; min-width: 0; }
.sidebar-intro { margin-top: 20px; margin-bottom: 20px; }
.sidebar-about-icon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    color: var(--secondary-text);
    text-decoration: none;
    transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}
.sidebar-about-icon:hover {
    color: var(--accent-color);
    border-color: var(--accent-color);
    background-color: rgba(var(--brand-rgb), 0.08);
}
.visit-btn-sidebar-top { margin-bottom: 16px; display: block; text-align: center; }
.bio-container { display: flex; gap: 15px; align-items: center; border-top: 1px solid var(--border-color); padding-top: 20px; }
.sidebar-visit-wrap { border: none; padding-top: 0; flex-shrink: 0; }
.sidebar:has(.sidebar-scroll-spy) .sidebar-visit-wrap {
    margin-top: 16px;
}

/* Sidebar tools marquee */
.sidebar-tools-marquee {
    flex-shrink: 0;
    margin-top: auto;
    padding-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 0;
}
.sidebar:has(.sidebar-visit-wrap) .sidebar-tools-marquee {
    margin-top: 20px;
}
.sidebar-skills-block {
    min-width: 0;
    padding-top: 18px;
    padding-bottom: 18px;
    border-top: 1px solid var(--border-color);
}
.sidebar-tools-block {
    min-width: 0;
    padding-top: 18px;
    border-top: 1px solid var(--border-color);
}
.sidebar-tools-label {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--secondary-text);
    margin: 0 0 10px;
}
.sidebar-skills-track {
    display: flex;
    align-items: center;
    gap: 10px;
    width: max-content;
    margin: 0;
    padding: 2px 0 6px;
    list-style: none;
    animation: sidebar-tools-scroll 36s linear infinite;
}
.sidebar-skills-static {
    width: 100%;
    max-width: 100%;
    flex-wrap: wrap;
    gap: 8px;
    animation: none;
    padding: 0 0 4px;
}
.sidebar-skills-block .sidebar-tools-viewport {
    overflow: visible;
    mask-image: none;
    -webkit-mask-image: none;
}
.sidebar-skill-item {
    flex-shrink: 0;
}
.sidebar-skill-chip {
    display: inline-block;
    font-size: 0.58rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 5px 10px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    color: var(--text-color);
    background: rgba(var(--brand-rgb), 0.06);
    white-space: nowrap;
}
.sidebar-tools-viewport {
    overflow: hidden;
    width: 100%;
    mask-image: linear-gradient(90deg, transparent 0%, #000 10%, #000 90%, transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 10%, #000 90%, transparent 100%);
}
.sidebar-tools-track {
    display: flex;
    align-items: center;
    gap: 28px;
    width: max-content;
    margin: 0;
    padding: 4px 0 8px;
    list-style: none;
    animation: sidebar-tools-scroll 32s linear infinite;
}
.sidebar-tool-item {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sidebar-tool-logo {
    display: block;
    width: 36px;
    height: 36px;
    object-fit: contain;
    opacity: 0.92;
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.sidebar-tool-item:hover .sidebar-tool-logo {
    opacity: 1;
    transform: scale(1.06);
}
[data-theme="dark"] .sidebar-tool-logo {
    filter: brightness(0) invert(1);
    opacity: 0.92;
}
[data-theme="dark"] .sidebar-tool-item:hover .sidebar-tool-logo {
    opacity: 1;
}
@keyframes sidebar-tools-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
    .sidebar-tools-track,
    .sidebar-skills-track {
        animation: none;
        flex-wrap: wrap;
        width: 100%;
        justify-content: flex-start;
        gap: 8px;
    }
    .sidebar-tools-viewport { mask-image: none; -webkit-mask-image: none; }
}

/* Right Panel */
.right-panel {
    width: var(--panel-width);
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    background: var(--bg-color);
}

/* Project pages — compact sidebar on scroll (desktop only); home stays fixed */
@media (min-width: 1201px) {
    .content-wrapper.sidebar-compact-scope {
        --sidebar-width: 30%;
        --panel-width: 70%;
        --sidebar-pad-x: 30px;
    }
    .content-wrapper.sidebar-compact-scope--project .sidebar,
    .content-wrapper.sidebar-compact-scope--project .right-panel {
        transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    }
    .content-wrapper.sidebar-compact-scope--project .sidebar {
        transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1), padding 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    }
    .content-wrapper.sidebar-compact-scope--project {
        --project-sidebar-gap: 14px;
        --sidebar-pad-x: 18px;
        --project-sidebar-width-percent: 16;
        --project-sidebar-width-extra: 34;
        gap: var(--project-sidebar-gap);
    }
    .content-wrapper.sidebar-compact-scope--project .sidebar {
        width: calc(16% + 34px);
        flex-shrink: 0;
    }
    .content-wrapper.sidebar-compact-scope--project .right-panel {
        flex: 1;
        width: auto;
        min-width: 0;
    }
    .content-wrapper.sidebar-compact-scope--project .hero-text h1 {
        font-size: clamp(1.45rem, 9cqi, 2.1rem);
        margin-bottom: 10px;
    }
    .content-wrapper.sidebar-compact-scope--project .hero-text .sidebar-meta-value {
        font-size: 0.88rem;
    }
    .content-wrapper.sidebar-compact-scope--project.sidebar-compact {
        --sidebar-pad-x: 14px;
        --project-sidebar-width-percent: 12;
        --project-sidebar-width-extra: 34;
    }
    .content-wrapper.sidebar-compact-scope--project.sidebar-compact .sidebar {
        width: calc(12% + 34px);
    }
    .content-wrapper.sidebar-compact-scope--project.sidebar-compact .hero-text h1 {
        font-size: clamp(1.25rem, 8cqi, 1.85rem);
    }
    .content-wrapper.sidebar-compact-scope--project.sidebar-compact .hero-text .sidebar-meta-value {
        font-size: 0.8rem;
    }
    .content-wrapper.sidebar-compact-scope--project.sidebar-compact .sidebar-intro {
        font-size: 0.82rem;
        margin-top: 16px;
        margin-bottom: 16px;
    }
    .content-wrapper.sidebar-compact-scope--project.sidebar-compact .sidebar-tag {
        font-size: 0.58rem;
        padding: 2px 8px;
    }
    .content-wrapper.sidebar-compact-scope--project.sidebar-compact .back-btn {
        font-size: 0.6rem;
        padding: 4px 9px;
        margin-bottom: 16px;
        gap: 5px;
    }
    .content-wrapper.sidebar-compact-scope--project.sidebar-compact .sidebar-scroll-spy-link {
        font-size: 0.56rem;
        padding: 2px 0 2px 12px;
        border-left-width: 3px;
    }
    .content-wrapper.sidebar-compact-scope--project.sidebar-compact .visit-btn {
        padding: 12px 16px;
        font-size: 0.82rem;
    }
    .content-wrapper.sidebar-compact-scope--project.sidebar-compact .sidebar-scroll-spy {
        padding: 14px 0;
    }
    .content-wrapper.sidebar-compact-scope--project.sidebar-compact .sidebar-top {
        padding: 18px 14px 16px;
    }
    .content-wrapper.sidebar-compact-scope--project.sidebar-compact .sidebar-bottom-block {
        padding: 0 14px;
    }
    .content-wrapper.sidebar-compact-scope--project.sidebar-compact .sidebar-tools-label {
        font-size: 0.56rem;
        margin-bottom: 8px;
    }
    .content-wrapper.sidebar-compact-scope--project.sidebar-compact .sidebar-skill-chip {
        font-size: 0.52rem;
        padding: 4px 8px;
    }
    .content-wrapper.sidebar-compact-scope--project.sidebar-compact .sidebar-tool-logo {
        width: 30px;
        height: 30px;
    }
}
@media (min-width: 1201px) and (prefers-reduced-motion: reduce) {
    .content-wrapper.sidebar-compact-scope--project .sidebar,
    .content-wrapper.sidebar-compact-scope--project .right-panel {
        transition: none;
    }
}

/* Scroll Area — native scrolling. Smooth behavior is opt-in and gated behind
   prefers-reduced-motion so keyboard/anchor scrolls are instant when the user
   asks for reduced motion. */
@media (prefers-reduced-motion: no-preference) {
    html,
    .scroll-area {
        scroll-behavior: smooth;
    }
}

.scroll-area {
    flex-grow: 1;
    min-height: 0;
    height: auto;
    overflow-y: auto;
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--bg-color);
    padding-bottom: 0 !important;
}

/* Hard reset: remove any bottom padding on scroll container */
#scroll-container {
    padding-bottom: 0 !important;
}

.single-page-wrapper {
    padding-bottom: 0;
    margin-bottom: 0;
}

/* When footer is inside scroll content (home/playground), keep it at bottom and avoid white gap */
.single-page-wrapper:has(.site-footer-shell) {
    min-height: 100%;
    display: flex;
    flex-direction: column;
}
.single-page-wrapper:has(.site-footer-shell) .site-footer-shell {
    margin-top: auto;
}
.single-page-wrapper:has(.site-footer-shell-green) {
    padding-bottom: 32px;
}
/* When a projects-cta is present: pull only the monster up into the CTA padding */
.single-page-wrapper:has(.projects-cta) .site-footer-shell {
    margin-top: 0;
    position: relative;
    z-index: 2;
}
.single-page-wrapper:has(.projects-cta) .site-footer-monster {
    margin-top: -192px;
}
.single-page-wrapper:has(.projects-cta) .site-contact-band {
    position: relative;
    z-index: 12;
}

/* FOOTER */
.site-footer-shell {
    flex-shrink: 0;
    position: relative;
    z-index: 5;
    margin-top: auto;
    margin-bottom: 0;
    overflow: visible;
}
.site-footer-shell-green {
    background: transparent;
    position: relative;
    z-index: 5;
    overflow: visible;
    margin-top: 56px;
}
.site-footer-monster {
    position: relative;
    z-index: 2;
    height: auto;
    min-height: 0;
    overflow: visible;
    background: transparent;
}
.site-footer {
    flex-shrink: 0;
    margin: 0;
    height: auto;
    padding: 15px 30px;
    border-top: 1px solid var(--border-color);
    display: flex; justify-content: space-between; align-items: center;
    font-size: 0.75rem; color: var(--secondary-text);
    background: var(--bg-color);
    z-index: 100;
}
.site-footer-green {
    background: var(--accent-color);
    color: #000000;
    border-top: 0;
}
.site-footer-green .footer-copyright,
.site-footer-green .connect-label,
.site-footer-green .socials > span {
    color: #000000;
}
.site-footer-green .footer-tech-link {
    color: #000000;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.site-footer-green .footer-tech-link:hover,
.site-footer-green .footer-tech-link:focus-visible {
    opacity: 0.75;
}
.site-footer.site-footer-green .socials a,
.site-footer.site-footer-green .socials a:visited,
.site-footer.site-footer-green .socials .social-link,
.site-footer.site-footer-green .socials .resume-link {
    color: #000000;
}
.site-footer-green .resume-link {
    border-color: rgba(0, 0, 0, 0.55);
}
.site-footer-green .social-link:not(.resume-link) {
    border-color: rgba(0, 0, 0, 0.35);
}

/* Home footer tech note */
.footer-tech-note {
    font-size: 0.75rem;
    line-height: 1.45;
    color: var(--secondary-text);
}
.site-footer-green .footer-tech-note {
    color: rgba(0, 0, 0, 0.62);
}
.footer-tech-inline {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: inherit;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    vertical-align: baseline;
    transition: color 0.2s ease;
}
.footer-tech-inline:hover,
.footer-tech-inline:focus-visible {
    color: var(--text-color);
    outline: none;
}
.site-footer-green .footer-tech-inline:hover,
.site-footer-green .footer-tech-inline:focus-visible {
    color: rgba(0, 0, 0, 0.85);
}
.footer-tech-inline .home-header-tech-logo--claude {
    color: #cc785c;
}
.site-footer-green .footer-tech-inline .home-header-tech-logo--claude {
    color: #b8603d;
}

/* Footer contact form (between monster eyes and footer bar) */
.site-contact-band {
    position: relative;
    z-index: 12;
    background: var(--accent-color);
    padding: 48px 40px 40px;
    overflow: visible;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.site-contact-inner {
    position: relative;
    z-index: 13;
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    text-align: left;
    gap: 20px;
    pointer-events: none;
}
.site-contact-inner a,
.site-contact-inner button,
.site-contact-inner input,
.site-contact-inner textarea,
.site-contact-inner label {
    pointer-events: auto;
}
.site-contact-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) 1px minmax(0, 0.95fr);
    gap: 0 56px;
    align-items: start;
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
}
.site-contact-col--intro {
    padding-top: 8px;
}
.site-contact-kicker {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 28px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(17, 17, 17, 0.62);
}
.site-contact-kicker-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #111111;
    box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.12);
    flex-shrink: 0;
}
.site-contact-heading {
    margin: 0;
    font-size: clamp(2.35rem, 4.8vw, 3.65rem);
    line-height: 1.04;
    font-weight: 800;
    letter-spacing: -0.035em;
    color: #111111;
}
.site-contact-col--intro .sidebar-socials {
    margin-top: 32px;
    padding-top: 0;
}
.site-contact-band .sidebar-social-link {
    color: #111111;
    border-color: rgba(17, 17, 17, 0.34);
}
.site-contact-band .sidebar-social-link:hover,
.site-contact-band .sidebar-social-link:focus-visible {
    color: #111111;
    border-color: rgba(17, 17, 17, 0.55);
    background: rgba(255, 255, 255, 0.22);
}
.site-contact-divider {
    width: 1px;
    align-self: stretch;
    min-height: 220px;
    background: rgba(17, 17, 17, 0.14);
}
.site-contact-col--body {
    padding-top: 8px;
}
.site-contact-lead {
    margin: 0 0 28px;
    max-width: none;
    font-size: 1.05rem;
    line-height: 1.65;
    font-weight: 500;
    color: rgba(17, 17, 17, 0.72);
}
.site-contact-fields {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    text-align: left;
    background: transparent;
    border: none;
    box-shadow: none;
    transform: none;
}
.site-contact-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 22px;
}
.site-contact-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 12px 24px;
    border-radius: 999px;
    font: inherit;
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.site-contact-btn i {
    font-size: 0.82rem;
}
.site-contact-btn--primary {
    border: 2px solid #111111;
    background: #111111;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}
.site-contact-btn--primary:hover:not(:disabled),
.site-contact-btn--primary:focus-visible {
    transform: translateY(-1px);
    background: #000000;
    border-color: #000000;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
    outline: none;
}
.site-contact-btn--outline {
    border: 2px solid rgba(17, 17, 17, 0.34);
    background: transparent;
    color: #111111;
}
.site-contact-btn--outline:hover,
.site-contact-btn--outline:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(17, 17, 17, 0.55);
    background: rgba(255, 255, 255, 0.22);
    outline: none;
}
.site-contact-success.comic-speech-bubble {
    padding: 22px 24px 28px;
    width: min(100%, 620px);
    max-width: 620px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
    text-align: center;
}
.connect-sticker {
    --sticker-tilt: -2deg;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    width: fit-content;
    max-width: 100%;
    padding: 7px 16px 8px;
    text-decoration: none;
    color: #111111;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.35;
    background: #ffffff;
    border: 4px solid #ffffff;
    border-radius: 16px;
    box-shadow:
        0 0 0 2px rgba(0, 0, 0, 0.08),
        4px 6px 0 rgba(0, 0, 0, 0.12),
        0 10px 22px rgba(0, 0, 0, 0.14);
    transform: rotate(var(--sticker-tilt));
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.connect-sticker i {
    width: 1.15rem;
    text-align: center;
    flex-shrink: 0;
}
.connect-sticker--email {
    --sticker-tilt: -3deg;
}
.connect-sticker--linkedin {
    --sticker-tilt: 2.5deg;
    color: #0a66c2;
}
.connect-sticker--resume {
    --sticker-tilt: -1.5deg;
}
.connect-sticker:hover,
.connect-sticker:focus-visible {
    transform: rotate(var(--sticker-tilt)) translateY(-3px) scale(1.02);
    box-shadow:
        0 0 0 2px rgba(0, 0, 0, 0.1),
        5px 7px 0 rgba(0, 0, 0, 0.14),
        0 14px 28px rgba(0, 0, 0, 0.16);
    outline: none;
}
.connect-sticker:focus-visible {
    outline: 2px solid #111111;
    outline-offset: 3px;
}
.back-btn.connect-sticker,
.sidebar-tag.connect-sticker {
    --sticker-tilt: -2deg;
    border: 4px solid #ffffff;
    border-radius: 16px;
    background: #ffffff;
    color: #111111;
    box-shadow:
        0 0 0 2px rgba(0, 0, 0, 0.08),
        4px 6px 0 rgba(0, 0, 0, 0.12),
        0 10px 22px rgba(0, 0, 0, 0.14);
    transform: rotate(var(--sticker-tilt));
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.back-btn.connect-sticker {
    --sticker-tilt: -2.5deg;
    text-transform: uppercase;
    margin-bottom: 24px;
}
.back-btn.connect-sticker:hover,
.back-btn.connect-sticker:focus-visible {
    color: #111111;
    border-color: #ffffff;
    background-color: #ffffff;
    transform: rotate(var(--sticker-tilt)) translateY(-3px) scale(1.02);
    box-shadow:
        0 0 0 2px rgba(0, 0, 0, 0.1),
        5px 7px 0 rgba(0, 0, 0, 0.14),
        0 14px 28px rgba(0, 0, 0, 0.16);
}
.sidebar-tag.connect-sticker {
    cursor: default;
}
.home-toolbox-stickers {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 16px;
    justify-content: flex-start;
    align-items: center;
    padding: 12px 0 4px;
    overflow: visible;
}
.tool-sticker {
    --sticker-tilt: 0deg;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    padding: 9px;
    background: #ffffff;
    border: 2px solid #e8e6e1;
    border-radius: 16px;
    box-shadow: none;
    transform: rotate(var(--sticker-tilt));
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    pointer-events: auto;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.tool-sticker:hover,
.tool-sticker:focus-visible {
    transform: rotate(var(--sticker-tilt)) translateY(-4px) scale(1.06);
    box-shadow: none;
    outline: none;
}
.tool-sticker img,
.tool-sticker-svg {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    filter: none;
}
.tool-sticker-mark {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.2rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.03em;
}
.tool-sticker--figma {
    --sticker-tilt: -9deg;
}
.tool-sticker--ai {
    --sticker-tilt: 7deg;
}
.tool-sticker--ps {
    --sticker-tilt: -5deg;
}
.tool-sticker--code {
    --sticker-tilt: 10deg;
    width: 64px;
    height: 64px;
    padding: 7px;
}
.tool-sticker--drupal {
    --sticker-tilt: -6deg;
}
.tool-sticker--wordpress {
    --sticker-tilt: 5deg;
}
.tool-sticker--indesign {
    --sticker-tilt: -4deg;
}
.tool-sticker--indesign .tool-sticker-mark--id {
    font-size: 1.1rem;
}
.tool-sticker--vscode {
    --sticker-tilt: 8deg;
}
.tool-sticker--github {
    --sticker-tilt: -7deg;
}
.tool-sticker--cursor {
    --sticker-tilt: 6deg;
}
.tool-sticker--claude {
    --sticker-tilt: -5deg;
}
.tool-sticker--gemini {
    --sticker-tilt: 9deg;
}
.tool-sticker--chatgpt {
    --sticker-tilt: -8deg;
}
.tool-sticker-code-mark {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    width: 100%;
    height: 100%;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    line-height: 1;
    color: var(--text-color);
}
.home-toolbox-stickers .tool-sticker-mark,
.home-toolbox-stickers .tool-sticker-code-mark {
    color: var(--text-color);
}
.home-toolbox-stickers .tool-sticker img,
.home-toolbox-stickers .tool-sticker-svg {
    filter: brightness(0);
}
.site-contact-title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.2;
    color: #000000;
}
.site-contact-desc {
    margin: 0;
    text-align: center;
}

/* Comic speech bubbles (footer monster + contact copy) */
.comic-speech-bubble {
    position: relative;
    display: inline-block;
    background: #ffffff;
    border: 3px solid #111111;
    border-radius: 26px;
    box-shadow: var(--conversation-bubble-shadow);
    color: #111111;
    font-weight: 700;
}
.comic-speech-bubble--tail-down::before,
.comic-speech-bubble--tail-up::before {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    z-index: 0;
}
.comic-speech-bubble--tail-down::after,
.comic-speech-bubble--tail-up::after {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    z-index: 1;
}
.comic-speech-bubble--tail-down::before {
    bottom: -17px;
    left: var(--bubble-tail-x, 64%);
    transform: translateX(-50%) rotate(10deg);
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-top: 18px solid #111111;
}
.comic-speech-bubble--tail-down::after {
    bottom: -11px;
    left: var(--bubble-tail-x, 64%);
    transform: translateX(-50%) rotate(10deg);
    border-left: 9px solid transparent;
    border-right: 9px solid transparent;
    border-top: 14px solid #ffffff;
}
.comic-speech-bubble--tail-right::before {
    right: -17px;
    top: 50%;
    left: auto;
    bottom: auto;
    transform: translateY(-50%) rotate(-90deg);
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-top: 18px solid #111111;
    border-bottom: none;
}
.comic-speech-bubble--tail-right::after {
    right: -12px;
    top: 50%;
    left: auto;
    bottom: auto;
    transform: translateY(-50%) rotate(-90deg);
    border-left: 9px solid transparent;
    border-right: 9px solid transparent;
    border-top: 14px solid #ffffff;
    border-bottom: none;
}
.comic-speech-bubble--tail-right {
    --bubble-tail-x: 58%;
}
.comic-speech-bubble--tail-up::before {
    top: -17px;
    left: 22%;
    transform: translateX(-50%) rotate(-14deg);
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-bottom: 18px solid #111111;
}
.comic-speech-bubble--tail-up::after {
    top: -11px;
    left: 22%;
    transform: translateX(-50%) rotate(-14deg);
    border-left: 9px solid transparent;
    border-right: 9px solid transparent;
    border-bottom: 14px solid #ffffff;
}
.site-contact-desc.comic-speech-bubble {
    padding: 12px 18px 14px;
    font-size: 0.95rem;
    line-height: 1.45;
    transform: rotate(-2.5deg);
    white-space: nowrap;
}
.site-contact-form {
    position: relative;
    z-index: 14;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
}
.site-contact-input {
    width: 100%;
    border: 1px solid rgba(17, 17, 17, 0.1);
    border-radius: 14px;
    padding: 12px 14px;
    font: inherit;
    font-size: 0.92rem;
    color: #111111;
    background: rgba(255, 255, 255, 0.92);
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.site-contact-input::placeholder {
    color: rgba(17, 17, 17, 0.38);
}
.site-contact-input:required {
    box-shadow: none;
}
.site-contact-input:required:user-invalid {
    border-color: rgba(192, 57, 43, 0.85);
    background: rgba(192, 57, 43, 0.06);
}
.site-contact-input:focus {
    outline: none;
    border-color: rgba(17, 17, 17, 0.22);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.55);
}
.site-contact-row {
    text-align: left;
}
.site-contact-row + .site-contact-row {
    margin-top: 14px;
}
.site-contact-label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #111111;
}
.site-contact-label .site-contact-required {
    color: rgba(0, 0, 0, 0.55);
    font-weight: 700;
}
.site-contact-textarea {
    resize: vertical;
    min-height: 108px;
}
.site-contact-word-count {
    margin: 8px 0 0;
    font-size: 0.72rem;
    color: rgba(0, 0, 0, 0.55);
    text-align: left;
}
.site-contact-word-count.is-over-limit {
    color: #7b241c;
    font-weight: 700;
}
.site-contact-honey {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}
.site-contact-submit {
    margin-top: 0;
    width: auto;
    border: 2px solid #111111;
    border-radius: 999px;
    padding: 12px 24px;
    background: #111111;
    color: #ffffff;
    font: inherit;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
    transition: transform 0.18s ease, opacity 0.15s, background 0.18s ease, box-shadow 0.18s ease;
}
.site-contact-submit:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
    background: #000000;
    border-color: #000000;
}
.site-contact-submit:disabled {
    opacity: 0.72;
    cursor: wait;
}
.site-contact-error {
    margin: 12px 0 0;
    font-size: 0.82rem;
    line-height: 1.5;
    color: #7b241c;
    text-align: left;
}
.site-contact-success {
    position: relative;
    z-index: 2;
    text-align: center;
    width: min(100%, 620px);
    max-width: 620px;
    margin: 0 auto;
    transform: rotate(-1deg);
    transform-origin: center center;
}
.site-contact-success.comic-speech-bubble[hidden] {
    display: none;
}
.site-contact-success i {
    font-size: 2rem;
    color: rgba(0, 0, 0, 0.75);
    margin-bottom: 10px;
}
.site-contact-success-title {
    margin: 0 0 8px;
    font-size: 1.05rem;
    font-weight: 800;
    color: #000000;
}
.site-contact-success-text {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.65;
    color: rgba(0, 0, 0, 0.72);
}

.site-footer.site-footer-green .socials .social-link:not(.resume-link):hover,
.site-footer.site-footer-green .socials .social-link:not(.resume-link):focus-visible,
.site-footer.site-footer-green .socials .resume-link:hover,
.site-footer.site-footer-green .socials .resume-link:focus-visible {
    color: #000000;
    border-color: #000000;
    background: rgba(255, 255, 255, 0.18);
}

/* WORKS HEADER — Desktop: side-by-side row */
.works-header {
    position: sticky;
    top: 0;
    padding: 10px 30px;
    background: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    display: flex; flex-direction: row; align-items: center; gap: 15px;
    z-index: 90;
}

.section-title { font-weight: 700; font-size: 1rem; white-space: nowrap; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-btn { background: none; border: 1px solid var(--border-color); padding: 6px 14px; border-radius: 20px; cursor: pointer; color: var(--secondary-text); font-size: 0.8rem; }
.filter-btn.active, .filter-btn:hover { border-color: var(--accent-color); color: var(--text-color); }

/* Home — featured spotlight cards (Pic2Split, LCM, UAV) */
.home-featured-edge,
.home-featured-edge-inner {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    box-sizing: border-box;
}
.home-featured-edge {
    padding: 8px 30px 88px;
    overflow: visible;
}
.home-featured-edge-header {
    margin-bottom: 28px;
}
.home-featured-edge-kicker {
    margin: 0 0 10px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent-color);
}
.home-featured-edge-title {
    margin: 0 0 12px;
    font-size: clamp(1.55rem, 3.2vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    color: var(--text-color);
}
.home-featured-edge-intro {
    margin: 0;
    max-width: 760px;
    font-size: 0.98rem;
    line-height: 1.65;
    font-weight: 600;
    color: var(--secondary-text);
}
.home-featured-spotlights {
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.home-featured-spotlights--stack {
    --spotlight-stack-top: clamp(64px, 10vh, 96px);
    --spotlight-stack-height: 560px;
    --spotlight-stack-spacer: min(48vh, 440px);
    --spotlight-stack-overlap: var(--spotlight-stack-height);
    --spotlight-stack-release: 72px;
    display: block;
    gap: 0;
    padding-bottom: var(--spotlight-stack-release);
}
.home-featured-spotlights--stack .home-spotlight-card {
    position: sticky;
    top: var(--spotlight-stack-top);
    z-index: var(--spotlight-stack-z, 1);
    margin: 0 0 var(--spotlight-stack-spacer);
    opacity: 1;
    transform: none;
    background: var(--bg-color);
}
.home-featured-spotlights--stack .home-spotlight-card + .home-spotlight-card {
    margin-top: calc(-1 * var(--spotlight-stack-overlap));
}
.home-featured-spotlights--stack .home-spotlight-card + .home-spotlight-card::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 100%;
    height: var(--spotlight-stack-spacer);
    background: var(--bg-color);
    pointer-events: none;
}
.home-featured-spotlights--stack .home-spotlight-card:last-child {
    margin-bottom: 0;
}
.home-featured-spotlights--stack .home-spotlight-card:nth-child(1) { --spotlight-stack-z: 1; }
.home-featured-spotlights--stack .home-spotlight-card:nth-child(2) { --spotlight-stack-z: 2; }
.home-featured-spotlights--stack .home-spotlight-card:nth-child(3) { --spotlight-stack-z: 3; }
.home-featured-spotlights--stack .home-spotlight-card:nth-child(4) { --spotlight-stack-z: 4; }
.home-featured-spotlights--stack .home-spotlight-card__link {
    min-height: 100%;
    height: 100%;
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.65),
        0 6px 24px rgba(0, 0, 0, 0.07),
        0 16px 40px rgba(0, 0, 0, 0.05);
}
.home-featured-spotlights--stack .home-spotlight-card__visual {
    align-self: stretch;
    aspect-ratio: auto;
    min-height: 100%;
}
.home-featured-spotlights--stack .home-spotlight-card__link:hover,
.home-featured-spotlights--stack .home-spotlight-card__link:focus-visible {
    border-color: var(--accent-color);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.65),
        0 10px 28px rgba(0, 0, 0, 0.09),
        0 20px 48px rgba(var(--brand-rgb), 0.12);
    outline: none;
}
.home-featured-spotlights--stack .home-spotlight-card.home-reveal--bubble-pop:not(.is-revealed) {
    opacity: 0;
    transform: scale(0.15) rotate(var(--home-pop-tilt, 0deg));
}
.home-featured-spotlights--stack .home-spotlight-card.home-reveal--bubble-pop.is-revealed,
.home-featured-spotlights--stack .home-spotlight-card.project-enter {
    opacity: 1;
}
.home-featured-spotlights--stack .home-spotlight-card.home-reveal.is-revealed:not(.home-reveal--bubble-pop),
.home-featured-spotlights--stack .home-spotlight-card.project-enter {
    transform: none;
}
@media (max-width: 900px), (prefers-reduced-motion: reduce) {
    .home-featured-spotlights--stack {
        display: flex;
        flex-direction: column;
        gap: 24px;
        padding-bottom: 0;
    }
    .home-featured-spotlights--stack .home-spotlight-card,
    .home-featured-spotlights--stack .home-spotlight-card:not(:last-child) {
        position: static;
        top: auto;
        z-index: auto;
        margin-bottom: 0;
        min-height: 0;
        background: transparent;
    }
    .home-featured-spotlights--stack .home-spotlight-card + .home-spotlight-card {
        margin-top: 0;
    }
    .home-featured-spotlights--stack .home-spotlight-card + .home-spotlight-card::before {
        display: none;
    }
    .home-featured-spotlights--stack .home-spotlight-card__link {
        min-height: 0;
        height: auto;
    }
    .home-featured-spotlights--stack .home-spotlight-card__visual {
        align-self: start;
        aspect-ratio: 1 / 1;
        min-height: 0;
    }
}
.home-spotlight-card {
    opacity: 0;
    transform: translateY(40px);
}
.home-spotlight-card.project-enter,
.home-spotlight-card.home-reveal.is-revealed:not(.home-reveal--bubble-pop) {
    opacity: 1;
    transform: translateY(0);
}
.home-spotlight-card.home-reveal--bubble-pop.is-revealed {
    opacity: 1;
}
.home-spotlight-card__link {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: stretch;
    min-height: 0;
    border-radius: 20px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    background: var(--bg-color);
    border: 2px solid #e8e6e1;
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.65),
        0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}
.home-spotlight-card__link:hover,
.home-spotlight-card__link:focus-visible {
    transform: translateY(-4px);
    border-color: var(--accent-color);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.65),
        0 8px 24px rgba(0, 0, 0, 0.08);
    outline: none;
}
.home-spotlight-card__visual {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    padding: 0;
    background: #ececea;
    overflow: hidden;
    align-self: start;
}
.home-spotlight-card__hero {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}
.home-spotlight-card__body {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 28px 32px;
    background: var(--bg-color);
    color: var(--text-color);
    border-left: 1px solid var(--border-color);
}
.home-spotlight-card__eyebrow {
    margin: 0;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent-color);
}
.home-spotlight-card__title {
    margin: 0;
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--text-color);
}
.home-spotlight-card__desc {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.7;
    color: var(--secondary-text);
}
.home-spotlight-card__stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 4px 0 0;
    padding: 0;
}
.home-spotlight-stat {
    margin: 0;
    min-width: 0;
}
.home-spotlight-stat__value {
    margin: 0 0 4px;
    font-size: clamp(1.05rem, 1.8vw, 1.2rem);
    font-weight: 800;
    line-height: 1.2;
    color: var(--text-color);
}
.home-spotlight-stat__value--accent {
    color: var(--accent-color);
}
.home-spotlight-stat__label {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.45;
    color: var(--secondary-text);
}
.home-spotlight-card__cta {
    margin-top: auto;
    padding-top: 8px;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--accent-color);
}
.home-spotlight-card__cta i {
    margin-left: 6px;
    font-size: 0.8em;
}

/* ===== Sticky stacking project cards ===== */
.stack-deck {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding-bottom: 48px;
}
#featured-work:has(+ #home-can-bring) .stack-deck {
    padding-bottom: 0;
}
#featured-work:has(+ #home-can-bring) {
    padding-bottom: 0;
}
#featured-work + #home-can-bring {
    /* Tightened so "What can I bring" reads as part of the featured group
       (was clamp(96px, 14vh, 168px)) — roughly the inter-card rhythm. */
    margin-top: clamp(28px, 4vh, 56px);
}
.stack-card {
    position: relative;
    margin-bottom: 56px;
}
.stack-card:last-child {
    margin-bottom: 0;
}
.stack-card--more:has(+ #home-can-bring),
.stack-card--more:has(+ .stack-card--can-bring) {
    margin-bottom: 0;
}
.stack-card__link {
    display: block;
    border-radius: 14px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    background: #fff;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: none;
    transition: border-color 0.25s ease;
}
.stack-card__link:hover,
.stack-card__link:focus-visible {
    border-color: rgba(0, 0, 0, 0.28);
    outline: none;
}
/* macOS window titlebar */
.stack-card__bar {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 46px;
    padding: 0 16px;
    background: linear-gradient(#fbfbfb, #efefef);
    border-bottom: 1px solid rgba(0, 0, 0, 0.09);
}
.stack-card__dots {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: none;
}
.stack-card__dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.14);
}
.stack-card__dot--red { background: #ff5f57; }
.stack-card__dot--yellow { background: #febc2e; }
.stack-card__dot--green { background: #28c840; }
.stack-card__name {
    flex: 1;
    text-align: center;
    font-weight: 600;
    font-size: 0.88rem;
    letter-spacing: -0.01em;
    color: #5b5b5b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.stack-card__category {
    flex: none;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: #1f8a4c;
    padding: 4px 11px;
    background: var(--accent-green-soft, rgba(var(--brand-rgb), 0.08));
    border: 1px solid rgba(var(--brand-rgb), 0.2);
    border-radius: 999px;
}
.stack-card__split {
    display: flex;
    align-items: stretch;
}
.stack-card__media {
    position: relative;
    flex: 0 0 52%;
    max-width: 52%;
    width: 52%;
    aspect-ratio: 1 / 1;
    flex-shrink: 0;
    align-self: center;
    background: #f3f4f6;
    overflow: hidden;
}
.stack-card__soon-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 2;
    padding: 5px 11px;
    border-radius: 999px;
    background: rgba(17, 17, 17, 0.85);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}
.stack-card__link--soon {
    cursor: default;
}
.stack-card__cta--soon {
    color: var(--secondary-text);
}
/* "More work" collection card inside the featured deck */
.stack-card__link--static {
    cursor: default;
}
.stack-card--more .stack-card__link--static {
    min-height: clamp(380px, 52vw, 420px);
}
.more-work-card {
    display: flex;
    flex-direction: column;
    gap: 24px;
    height: 100%;
    min-height: inherit;
    padding: 40px 0 0;
    box-sizing: border-box;
}
.more-work-card__head {
    flex: 0 0 auto;
    max-width: 560px;
    padding: 0 44px;
}
.more-work-card__intro {
    margin: 12px 0 0;
    font-size: 1rem;
    line-height: 1.6;
    font-weight: 500;
    color: var(--secondary-text);
}
.more-work-carousel {
    flex: 1 1 auto;
    overflow: hidden;
    width: 100%;
    min-height: 0;
    margin: 0;
    padding: 0;
    cursor: grab;
    user-select: none;
}
.more-work-carousel-track {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0;
    width: max-content;
    will-change: transform;
}
.stack-card--more .more-work-carousel .more-work-tile {
    flex: 0 0 200px;
    width: 200px;
}
.more-work-tile {
    display: block;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    font: inherit;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    text-align: inherit;
    appearance: none;
    -webkit-appearance: none;
}
.more-work-tile__img {
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 0;
    border: none;
    background: #f3f4f6;
}
.more-work-tile__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.more-work-tile:hover .more-work-tile__img img,
.more-work-tile:focus-visible .more-work-tile__img img {
    transform: scale(1.04);
}
.more-work-tile:focus-visible {
    outline: 3px solid var(--accent-color);
    outline-offset: 4px;
}
.stack-card__media img,
.stack-card__media video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/* Desktop split layout: the mp4 sits on the left half against the card content,
   so square its inner (right) corners while the left corners stay rounded.
   (Overrides the global `video { border-radius: 8px }`.) */
@media (min-width: 861px) {
    .stack-card__media video {
        border-top-right-radius: 0;
        border-bottom-right-radius: 0;
    }
}
.stack-card__content {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 40px 44px;
}
.stack-card__headline {
    margin: 0;
    font-size: clamp(1.1rem, 1.8vw, 1.45rem);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.025em;
    color: var(--text-color);
}
.stack-card__desc {
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
    font-weight: 500;
    color: var(--secondary-text);
}
.stack-card__tags {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.stack-card__tag {
    font-size: 0.74rem;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--accent-green-soft, rgba(var(--brand-rgb), 0.08));
    color: #1f8a4c;
    border: 1px solid rgba(var(--brand-rgb), 0.2);
}
.stack-card__cta {
    margin-top: auto;
    align-self: flex-end;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
    line-height: 0;
}
.stack-card__cta-arrow {
    width: 3.25rem;
    height: 3.25rem;
    display: block;
    transition: transform 0.2s ease;
}
.stack-card__link:hover .stack-card__cta-arrow,
.stack-card__link:focus-visible .stack-card__cta-arrow {
    transform: translate(3px, -3px);
}
.case-study-arrow-icon {
    flex-shrink: 0;
}
@media (max-width: 860px), (prefers-reduced-motion: reduce) {
    .stack-deck {
        padding-bottom: 0;
    }
    .stack-card {
        position: static;
        top: auto;
        transform: none !important;
        filter: none !important;
        margin-bottom: 40px;
    }
    .stack-card__split {
        flex-direction: column;
    }
    .stack-card__media,
    .stack-card__content {
        flex-basis: auto;
        max-width: 100%;
    }
    .stack-card__media {
        aspect-ratio: 1 / 1;
        align-self: stretch;
        width: 100%;
    }
    .stack-card__media img,
    .stack-card__media video {
        width: 100%;
        height: 100%;
        object-fit: cover;
        min-height: 0;
        max-height: none;
    }
    .stack-card__content {
        padding: 26px 24px;
    }
    .more-work-card {
        padding: 26px 0 0;
        gap: 18px;
    }
    .more-work-card__head {
        padding: 0 24px;
    }
    .stack-card--more .stack-card__link--static {
        min-height: 0;
    }
    .more-work-carousel .more-work-tile {
        flex: 0 0 min(42vw, 180px);
        width: min(42vw, 180px);
    }
}

/* More work — image deck */
.projects-more {
    width: min(100% - 60px, 1280px);
    max-width: 1280px;
    margin: 96px auto 0;
    padding: 32px 40px 36px;
    box-sizing: border-box;
}
.projects-more-inner {
    width: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    overflow: visible;
}
.projects-more-title,
.home-work-experience .about-section-heading {
    margin: 0;
    padding: 0 0 12px;
    font-size: clamp(1.55rem, 2.8vw, 1.85rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-color);
    line-height: 1.25;
}
.projects-more-intro {
    margin: 0 0 12px;
    max-width: 720px;
    font-size: 0.95rem;
    line-height: 1.6;
    font-weight: 600;
    color: var(--secondary-text);
}
.projects-more-title {
    display: flex;
    align-items: center;
    gap: 0.45em;
}
.projects-more .projects-more-title {
    justify-content: center;
    text-align: center;
}
.projects-more .projects-more-intro {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}
.projects-more-shapes {
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
    flex-shrink: 0;
}
.projects-more-shapes .shape {
    flex-shrink: 0;
    margin: 0;
}
.projects-more-scroll {
    position: relative;
    isolation: isolate;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin: 0 -40px;
    padding: 12px 40px 40px;
    scroll-padding-inline: 40px;
    scroll-snap-type: x proximity;
}
/* More work — flat images in a side-by-side row */
/* Attachment box that contains the More work images */
.projects-more-box {
    max-width: 920px;
    margin: 20px auto 0;
    border: 2px solid #e8e6e1;
    border-radius: 18px;
    background: #faf9f6;
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.6),
        0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    box-sizing: border-box;
}
.projects-more-box__bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    background: #f1efe9;
    border-bottom: 2px solid #e8e6e1;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-color);
}
.projects-more-box__icon {
    display: inline-flex;
    color: var(--accent-color);
    transform: rotate(45deg);
}
.projects-more-box__label {
    letter-spacing: 0.01em;
}
.projects-more-box__hint {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--secondary-text);
}
.projects-more-row-wrap {
    position: relative;
    isolation: isolate;
    width: 100%;
    margin: 0;
    padding: 12px 0 20px;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.projects-more-row-wrap::before {
    content: none;
}
.projects-more-row-wrap::-webkit-scrollbar {
    display: none;
}
.projects-more-row {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    gap: 32px;
    width: max-content;
    min-width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 24px 28px 32px;
    box-sizing: border-box;
}
.projects-more-card--flat {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 0 0 auto;
    width: var(--more-card-width, 140px);
    max-width: var(--more-card-width, 140px);
    margin: 0;
    padding: 0;
    transform: rotate(var(--card-tilt, 0deg));
    transform-origin: center center;
    z-index: var(--card-z, 1);
    isolation: isolate;
}
.projects-more-card--flat .projects-more-card-surface {
    display: block;
    width: 100%;
    padding: 0;
    box-sizing: border-box;
    border-radius: 6px;
    border: var(--elevation-border);
    box-shadow: var(--elevation-shadow);
    background: #ffffff;
}
.projects-more-card--flat[data-project-id="lt"] .projects-more-card-surface {
    border-radius: 0;
    border: none;
    box-shadow: none;
    background: transparent;
}
.projects-more-card--flat .projects-more-card-image {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    margin: 0;
    object-fit: contain;
    object-position: center bottom;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
}
.projects-more-card--flat .projects-more-card-caption {
    min-height: 44px;
    margin-top: 10px;
    padding: 0 4px;
}
.projects-more-card--flat .projects-more-card-name {
    font-size: 0.88rem;
    line-height: 1.15;
}
.projects-more-row.is-hovering .projects-more-card--flat:not(.is-active) {
    transform: rotate(var(--card-tilt, 0deg)) scale(0.98);
}
.projects-more-card--flat.is-active,
.projects-more-card--flat.home-reveal.is-revealed.is-active {
    z-index: 20;
    margin: 0;
    transform: rotate(0deg) translateY(-4px);
}
.projects-more-card--flat.home-reveal.is-revealed:not(.is-active) {
    transform: rotate(var(--card-tilt, 0deg));
}
.projects-more-row.is-hovering .projects-more-card--flat.home-reveal.is-revealed:not(.is-active) {
    transform: rotate(var(--card-tilt, 0deg)) scale(0.98);
}
.projects-more-board-wrap {
    position: relative;
    isolation: isolate;
    width: 100%;
    margin: 8px 0 0;
    padding: 12px 0 28px;
    overflow: visible;
}
.projects-more-board-wrap::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(150%, 1640px);
    height: clamp(360px, 150%, 560px);
    pointer-events: none;
    background-image:
        linear-gradient(to right, rgba(17, 17, 17, 0.08) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(17, 17, 17, 0.08) 1px, transparent 1px);
    background-size: 40px 40px;
    background-position: center center;
    -webkit-mask-image: radial-gradient(ellipse 82% 88% at 50% 50%, #000 42%, rgba(0, 0, 0, 0.4) 70%, transparent 88%);
    mask-image: radial-gradient(ellipse 82% 88% at 50% 50%, #000 42%, rgba(0, 0, 0, 0.4) 70%, transparent 88%);
    z-index: 0;
}
.projects-more-board {
    position: relative;
    z-index: 1;
    width: 100%;
    height: clamp(380px, 46vw, 500px);
    margin: 0 auto;
    overflow: visible;
}
.projects-more-card--board {
    position: absolute;
    left: var(--board-x, 10%);
    top: var(--board-y, 10%);
    z-index: var(--board-z, 1);
    width: min(var(--board-width, 160px), 22vw);
    max-width: min(var(--board-width, 160px), calc(100% - 24px));
    margin: 0;
    flex: none;
    transform: rotate(var(--board-rotate, 0deg));
    transform-origin: center center;
}
.projects-more-board.is-hovering .projects-more-card--board:not(.is-active) {
    transform: rotate(var(--board-rotate, 0deg)) scale(0.98);
}
.projects-more-card--board.is-active,
.projects-more-card--board.home-reveal.is-revealed.is-active {
    z-index: 20;
    margin: 0;
    transform: rotate(0deg) translateY(-10px) scale(1.04);
}
.projects-more-card--board.home-reveal.is-revealed:not(.is-active) {
    transform: rotate(var(--board-rotate, 0deg));
}
.projects-more-board.is-hovering .projects-more-card--board.home-reveal.is-revealed:not(.is-active) {
    transform: rotate(var(--board-rotate, 0deg)) scale(0.98);
}
.projects-more-card--board .projects-more-card-frame {
    padding: 8px 8px 12px;
}
.projects-more-card--board .projects-more-card-caption {
    min-height: 48px;
    margin-top: 8px;
}
.projects-more-card--board .projects-more-card-name {
    font-size: 0.92rem;
    line-height: 1.15;
}
.projects-more-card--board .projects-more-card-visual {
    aspect-ratio: 4 / 3;
}
.projects-more-scroll::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(150%, 1640px);
    height: clamp(360px, 150%, 560px);
    pointer-events: none;
    /* Light graph-paper grid behind the cards */
    background-image:
        linear-gradient(to right, rgba(17, 17, 17, 0.08) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(17, 17, 17, 0.08) 1px, transparent 1px);
    background-size: 40px 40px;
    background-position: center center;
    -webkit-mask-image: radial-gradient(ellipse 82% 88% at 50% 50%, #000 42%, rgba(0, 0, 0, 0.4) 70%, transparent 88%);
    mask-image: radial-gradient(ellipse 82% 88% at 50% 50%, #000 42%, rgba(0, 0, 0, 0.4) 70%, transparent 88%);
    z-index: 0;
}
.projects-more-scroll .projects-more-deck,
.projects-more-scroll .projects-more-scroll-hint {
    position: relative;
    z-index: 1;
}
.projects-more-scroll::-webkit-scrollbar {
    display: none;
}
.projects-more-deck {
    position: relative;
    z-index: 1;
    isolation: isolate;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 0;
    min-height: 340px;
    padding: 56px 0 32px;
}
.projects-more-deck--scroll {
    justify-content: center;
    align-items: stretch;
    gap: 0;
    width: max-content;
    min-width: 100%;
    min-height: 0;
    margin-inline: auto;
    padding: 16px 0 32px;
}
.projects-more-deck--scroll .projects-more-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    flex: 0 0 248px;
    width: 248px;
    margin: 0 -28px;
    overflow: visible;
    scroll-snap-align: center;
    transform: rotate(var(--card-tilt, 0deg));
    z-index: var(--card-z, 1);
}
.projects-more-deck--scroll .projects-more-card .projects-more-card-visual {
    overflow: hidden;
    border-radius: 2px;
}
.projects-more-card-frame {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 11px 11px 16px;
    border-radius: 3px;
    background: #f8f8f6;
    border: var(--elevation-border);
    box-shadow: var(--elevation-shadow);
    transition: box-shadow 0.82s cubic-bezier(0.22, 1, 0.36, 1);
}
.projects-more-card-caption {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-height: 58px;
    margin-top: 12px;
    padding: 0 4px;
    text-align: center;
}
.projects-more-card-name {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    width: 100%;
    max-width: 100%;
    position: static;
    z-index: auto;
    transform: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: #1a1a1a;
    /* Same handwriting face as the playground yellow sticker note */
    font-family: "Bradley Hand", "Segoe Print", "Comic Sans MS", cursive;
    font-size: 1.22rem;
    font-weight: 400;
    line-height: 1.18;
    letter-spacing: 0.01em;
    text-align: center;
    white-space: normal;
    box-shadow: none;
}
.projects-more-card-name__text {
    display: block;
    max-width: 100%;
    /* The global `* { font-family: Montserrat }` rule matches this span directly and
       beats the font inherited from the parent — so set the handwriting face here too. */
    font-family: inherit;
    clip-path: inset(0 100% 0 0);
}
.projects-more-card-name__underline {
    display: block;
    width: min(100%, 210px);
    height: 8px;
    margin-top: 1px;
    color: rgba(17, 17, 17, 0.5);
    overflow: visible;
}
.projects-more-card-name__stroke {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
}
.projects-more-card.home-reveal.is-revealed .projects-more-card-name__text {
    animation: projects-more-name-write 0.88s cubic-bezier(0.45, 0, 0.2, 1) forwards;
    animation-delay: calc(var(--home-reveal-delay, 0ms) + 140ms);
}
.projects-more-card.home-reveal.is-revealed .projects-more-card-name__stroke {
    animation: home-hero-cta-arrow-draw 0.72s cubic-bezier(0.45, 0, 0.2, 1) forwards;
    animation-delay: calc(var(--home-reveal-delay, 0ms) + 520ms);
}
.projects-more-card:hover .projects-more-card-name__text,
.projects-more-card.is-active .projects-more-card-name__text {
    animation: projects-more-name-write 0.72s cubic-bezier(0.45, 0, 0.2, 1) forwards;
}
.projects-more-card:hover .projects-more-card-name__stroke,
.projects-more-card.is-active .projects-more-card-name__stroke {
    animation: home-hero-cta-arrow-draw 0.62s cubic-bezier(0.45, 0, 0.2, 1) forwards;
    animation-delay: 0.38s;
}
@keyframes projects-more-name-write {
    to { clip-path: inset(0 0 0 0); }
}
@media (prefers-reduced-motion: reduce) {
    .projects-more-card-name__text {
        clip-path: inset(0 0 0 0);
        animation: none;
    }
    .projects-more-card-name__stroke {
        stroke-dashoffset: 0;
        animation: none;
    }
}
.projects-more-card.is-active .projects-more-card-name,
.projects-more-card:hover .projects-more-card-name,
.projects-more-card:focus-visible .projects-more-card-name {
    opacity: 1;
    visibility: visible;
    transform: none;
}
.projects-more-deck--scroll .projects-more-card.is-active {
    z-index: 20;
    margin-left: -18px;
    margin-right: -18px;
    transform: rotate(0deg) translateY(-10px) scale(1.04);
}
.projects-more-deck--scroll.is-hovering .projects-more-card:not(.is-active) {
    transform: rotate(var(--card-tilt, 0deg)) scale(0.98);
}
.projects-more-scroll .projects-more-deck--scroll {
    padding-top: 48px;
}
.projects-more-scroll-hint {
    display: none;
}
.projects-more-card {
    --card-tilt: 0deg;
    --card-z: 1;
    --card-lift: 0px;
    --card-ease: cubic-bezier(0.22, 1, 0.36, 1);
    --card-duration: 0.82s;
    --card-motion:
        transform var(--card-duration) var(--card-ease),
        box-shadow var(--card-duration) var(--card-ease),
        margin var(--card-duration) var(--card-ease);
    position: relative;
    z-index: var(--card-z);
    flex: 0 0 min(248px, 30vw);
    margin: 0 -36px;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    opacity: 1;
    box-shadow: none;
    text-align: center;
    cursor: pointer;
    overflow: visible;
    transform: rotate(var(--card-tilt)) translateY(var(--card-lift));
    transition: var(--card-motion);
    transition-delay: 0s;
    font: inherit;
    color: inherit;
}
.projects-more-deck.is-hovering .projects-more-card {
    will-change: transform, margin;
}
.projects-more-deck.is-hovering .projects-more-card:not(.is-active) {
    transform: rotate(var(--card-tilt)) translateY(var(--card-lift)) scale(0.98);
}
.projects-more-card.is-active {
    margin-left: 12px;
    margin-right: 12px;
    transform: rotate(0deg) translateY(-14px) scale(1.05);
}
.projects-more-card.is-active .projects-more-card-frame {
    box-shadow: var(--elevation-shadow);
}
/* Flat row cards: never overlap — override deck scroll negative margins */
.projects-more-row .projects-more-card.projects-more-card--flat {
    flex: 0 0 auto;
    margin: 0;
}
.projects-more-row .projects-more-card.projects-more-card--flat.is-active,
.projects-more-row .projects-more-card.projects-more-card--flat.home-reveal.is-revealed.is-active {
    margin: 0;
    transform: rotate(0deg) translateY(-4px);
}
.projects-more-row.is-hovering .projects-more-card.projects-more-card--flat:not(.is-active) {
    transform: rotate(var(--card-tilt, 0deg));
}
.projects-more-card:hover:not(.is-active) .projects-more-card-frame {
    box-shadow: var(--elevation-shadow);
}
.projects-more-card:focus-visible {
    outline: 3px solid #111111;
    outline-offset: 6px;
}
.projects-more-card-visual {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 2px;
    background: #ececec;
    flex-shrink: 0;
}
.projects-more-deck--scroll .projects-more-card-visual {
    aspect-ratio: 1 / 1;
    width: 100%;
    height: auto;
}
.projects-more-card-visual img {
    display: block;
    width: 100%;
    height: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    object-position: center center;
    transition: transform var(--card-duration, 0.82s) var(--card-ease, cubic-bezier(0.22, 1, 0.36, 1));
}
.projects-more-card.is-active .projects-more-card-visual img {
    transform: scale(1.03);
}
.projects-more-card-award {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    max-width: calc(100% - 24px);
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(17, 17, 17, 0.88);
    color: #ffffff;
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: 0.01em;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
    pointer-events: none;
}
.projects-more-card-name-award {
    display: block;
    margin-top: 2px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 0.68rem;
    font-weight: 600;
    color: rgba(17, 17, 17, 0.52);
}
.projects-more-deck:has(.projects-more-card:nth-child(6)) .projects-more-card {
    flex: 0 0 min(220px, 22vw);
    margin: 0 -48px;
}
.home-can-bring {
    position: relative;
    overflow: visible;
    max-width: 1280px;
    width: 100%;
    margin: 0 auto 168px;
    padding: 0 30px;
    box-sizing: border-box;
}
.home-panel {
    width: 100%;
    max-width: none;
    margin-left: auto;
    margin-right: auto;
    padding: 40px 44px;
    box-sizing: border-box;
    border-radius: 20px;
    background-color: #f7f7f5;
    background-image: radial-gradient(rgba(0, 0, 0, 0.09) 1.25px, transparent 1.25px);
    background-size: 16px 16px;
    background-position: center center;
    border: var(--elevation-border);
    box-shadow: none;
}
.home-section-title {
    margin: 0 0 12px;
    font-size: clamp(1.55rem, 3.2vw, 2.1rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    color: var(--text-color);
}
.home-section-title em {
    font-style: italic;
    font-family: Georgia, 'Times New Roman', Times, serif;
    font-weight: 400;
}
.home-can-bring-inner {
    max-width: none;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}
.home-can-bring-header {
    margin-bottom: 28px;
}
.home-can-bring-scroll-hint {
    margin: 10px 0 0;
    max-width: 420px;
    font-size: 0.84rem;
    line-height: 1.55;
    font-weight: 500;
    color: var(--secondary-text);
}
.home-can-bring-title {
    margin-bottom: 0;
}
#home-can-bring .projects-more-title {
    font-weight: 600;
}
.home-can-bring-panel,
#home-can-bring.home-panel {
    width: min(100%, 800px);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}
.home-can-bring-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    width: 100%;
}
.home-can-bring-card {
    position: relative;
    height: 340px;
    padding: 0;
    border: 0;
    border-radius: 18px;
    background: transparent;
    box-shadow: none;
    outline: none;
    perspective: 1400px;
    cursor: pointer;
}
.home-can-bring-card:focus-visible {
    outline: 3px solid var(--accent-color);
    outline-offset: 4px;
}
.home-can-bring-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.home-can-bring-card.is-flipped .home-can-bring-card-inner {
    transform: rotateY(180deg);
}
.home-can-bring-card-face {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 22px 22px 26px;
    border: var(--elevation-border);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: none;
    box-sizing: border-box;
    overflow: hidden;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}
/* Front-face teaser: keeps the card from looking empty before the flip. */
.home-can-bring-card-teaser {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.6;
    font-weight: 500;
    color: var(--secondary-text);
}
/* Flip affordance pinned to the bottom of the front face. Uses text-color
   (not the brand green) so the small label keeps ≥4.5:1 contrast on white. */
.home-can-bring-card-flip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--text-color);
}
.home-can-bring-card-flip i {
    font-size: 0.72rem;
    color: var(--accent-color);
}
@media (prefers-reduced-motion: no-preference) {
    .home-can-bring-card-flip i {
        transition: transform 0.25s ease;
    }
    .home-can-bring-card:hover .home-can-bring-card-flip i,
    .home-can-bring-card:focus-visible .home-can-bring-card-flip i {
        transform: translateX(3px);
    }
}
.home-can-bring-card-back {
    transform: rotateY(180deg);
    justify-content: center;
    background: #1a6b5c;
    border: var(--elevation-border);
    box-shadow: none;
}
.home-can-bring-card-num--back {
    color: #8fe3c8;
    margin-bottom: 2px;
}
.home-can-bring-card-back .home-can-bring-card-desc {
    color: rgba(255, 255, 255, 0.94);
}
@media (prefers-reduced-motion: reduce) {
    .home-can-bring-card-inner {
        transition: none;
    }
}
.home-can-bring-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 4px;
}
.home-can-bring-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: auto;
    border-radius: 0;
    background: transparent;
    border: none;
    color: var(--accent-color);
    font-size: 1.85rem;
    flex-shrink: 0;
}
.home-can-bring-card-num {
    font-size: 1.05rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--accent-color);
    line-height: 1;
}
.home-can-bring-card-title {
    margin: 0;
    max-width: 220px;
    font-size: clamp(1.05rem, 1.5vw, 1.18rem);
    font-weight: 500;
    letter-spacing: -0.02em;
    color: var(--text-color);
    line-height: 1.3;
}
.home-can-bring-card-desc {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.7;
    font-weight: 500;
    color: var(--secondary-text);
}
.home-can-bring-ai-note {
    position: absolute;
    top: -28px;
    right: 22px;
    left: auto;
    z-index: 2;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: auto;
    max-width: min(340px, calc(100% - 44px));
    margin: 0;
    padding: 12px 16px 18px;
    --bubble-tail-x: 76%;
    font-weight: 500;
    cursor: default;
}
.home-can-bring-ai-note p {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.55;
    font-weight: 500;
    color: var(--secondary-text);
}
.home-can-bring-ai-note strong {
    color: var(--text-color);
    font-weight: 500;
}
.home-can-bring-ai-note i {
    margin-top: 2px;
    flex-shrink: 0;
    color: var(--accent-color);
    font-size: 0.95rem;
}
@media (prefers-reduced-motion: no-preference) {
    .home-can-bring-ai-note.comic-speech-bubble {
        transform: rotate(2deg);
        transition:
            translate 0.32s cubic-bezier(0.34, 1.56, 0.64, 1),
            scale 0.32s cubic-bezier(0.34, 1.56, 0.64, 1),
            box-shadow 0.32s ease;
    }
    .home-can-bring-ai-note.comic-speech-bubble:hover {
        translate: 0 -7px;
        scale: 1.04;
    }
}
body.projects-more-modal-open {
    overflow: hidden;
}
.projects-more-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    box-sizing: border-box;
}
.projects-more-modal[hidden] {
    display: none;
}
.projects-more-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.52);
}
.projects-more-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(100%, 640px);
    max-height: min(90vh, 820px);
    overflow: auto;
    background: #ffffff;
    border: 3px solid #111111;
    border-radius: 24px;
    box-shadow: 8px 10px 0 rgba(0, 0, 0, 0.14);
    transform: rotate(-0.5deg);
}
.projects-more-modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    width: 36px;
    height: 36px;
    border: 2px solid #111111;
    border-radius: 50%;
    background: #ffffff;
    color: #111111;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
}
.projects-more-modal__hero {
    width: 100%;
    max-height: 280px;
    overflow: hidden;
    border-bottom: 2px solid rgba(0, 0, 0, 0.08);
}
.projects-more-modal__hero img {
    display: block;
    width: 100%;
    height: 100%;
    max-height: 280px;
    object-fit: cover;
}
.projects-more-modal__body {
    padding: 22px 24px 26px;
    display: flex;
    flex-direction: column;
}
.projects-more-modal__title {
    margin: 0 0 14px;
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.2;
    color: #111111;
}
.projects-more-modal__meta {
    margin: 0 0 14px;
    display: grid;
    gap: 10px;
}
.projects-more-modal__meta-row {
    display: grid;
    grid-template-columns: 88px 1fr;
    gap: 12px;
    align-items: start;
}
.projects-more-modal__meta dt {
    margin: 0;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(0, 0, 0, 0.55);
}
.projects-more-modal__meta dd {
    margin: 0;
    font-size: 0.86rem;
    line-height: 1.45;
    color: #111111;
    font-weight: 600;
}
.projects-more-modal__summary {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.6;
    color: rgba(0, 0, 0, 0.78);
}
.projects-more-modal__footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
}
.projects-more-modal__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 18px;
    border-radius: 999px;
    border: 1px solid var(--accent-color);
    background: var(--accent-color);
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

a.projects-more-modal__cta,
a.projects-more-modal__cta:visited {
    color: #ffffff;
}
.projects-more-modal__cta:hover,
.projects-more-modal__cta:focus-visible {
    transform: translateY(-1px);
    background-color: var(--brand-deep);
    outline: none;
}
@media (max-width: 900px) {
    .home-award-preview { display: none !important; }
}
/* Home about — award link cursor preview (desktop) */
.home-award-preview {
    position: fixed;
    top: 0;
    left: 0;
    width: 240px;
    height: 160px;
    border-radius: 12px;
    overflow: hidden;
    pointer-events: none;
    z-index: 99998;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.96) rotate(-2deg);
    transition: opacity 0.18s ease, visibility 0.18s ease, transform 0.18s ease;
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.2),
        0 0 0 3px #ffffff,
        0 0 0 5px rgba(0, 0, 0, 0.08);
    background: #ffffff;
}
.home-award-preview.is-visible {
    opacity: 1;
    visibility: visible;
    transform: scale(1) rotate(-2deg);
}
.home-award-preview img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/* Home — work experience (separate section below More projects) */
.home-below-projects {
    padding: 8px 30px 56px;
    margin-top: 24px;
    border-top: 1px solid var(--border-color);
    background: var(--accent-green-soft);
}
[data-theme="light"] .home-below-projects {
    background: linear-gradient(180deg, rgba(var(--brand-rgb), 0.09) 0%, rgba(var(--brand-rgb), 0.03) 100%);
}
[data-theme="dark"] .home-below-projects {
    background: linear-gradient(180deg, rgba(var(--brand-rgb), 0.12) 0%, rgba(var(--brand-rgb), 0.04) 100%);
}
.home-below-projects .about-exp-item {
    background: transparent;
    border-color: var(--border-color);
    transition: none;
}
.home-below-projects .about-exp-item:hover,
.home-below-projects .about-exp-group--work .about-exp-item:hover {
    background: transparent;
}
.home-work-experience {
    margin: 0;
}
/* Home — about section (bio, photo deck, career) */
.home-about {
    width: 100%;
    margin-top: 128px;
}
.home-about-intro {
    max-width: 1280px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding: 40px 30px 160px;
    box-sizing: border-box;
}
.home-about-title {
    padding-top: 0;
}
.home-about-lead {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: clamp(24px, 4vw, 48px);
    min-height: clamp(320px, 38vw, 400px);
    margin-bottom: clamp(40px, 5vw, 64px);
    padding: clamp(28px, 4vw, 48px) clamp(20px, 3vw, 40px);
    border-radius: 8px;
    box-sizing: border-box;
}
.home-about-lead::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    border-radius: inherit;
    background-image:
        linear-gradient(to right, rgba(17, 17, 17, 0.07) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(17, 17, 17, 0.07) 1px, transparent 1px);
    background-size: 34px 34px;
    background-position: center center;
}
.home-about-lead > * {
    position: relative;
    z-index: 1;
}
.home-about-copy {
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
    width: 440px;
    max-width: 100%;
    margin: 0;
    overflow: visible;
}
/* About copy as a modern flat sticky note */
.home-about-note-wrap {
    position: relative;
    width: fit-content;
    max-width: 100%;
    margin: 0 auto;
    overflow: visible;
}
.home-about-note-stickers {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 3;
}
.note-deco-sticker {
    --note-deco-tilt: 0deg;
    --deco-tilt: var(--note-deco-tilt);
    --sticker-size: 56px;
    --sticker-color: #f2a89a;
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--sticker-size);
    height: var(--sticker-size);
    padding: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    filter: none;
    transform: rotate(var(--note-deco-tilt));
    transition: transform 0.38s cubic-bezier(0.34, 1.35, 0.64, 1);
}
.note-deco-sticker__art {
    width: 100%;
    height: 100%;
    display: block;
    overflow: visible;
}
.note-deco-sticker__art path,
.note-deco-sticker__art circle,
.note-deco-sticker__art rect {
    fill: var(--sticker-color);
    stroke: #ffffff;
    stroke-width: 8;
    stroke-linejoin: round;
    stroke-linecap: round;
    paint-order: stroke fill;
}
.note-deco-sticker--heart {
    --note-deco-tilt: -18deg;
    --sticker-color: #f2a89a;
    --sticker-size: 58px;
    top: -22px;
    right: -24px;
}
.note-deco-sticker--star {
    --note-deco-tilt: 10deg;
    --sticker-color: #f0d56b;
    --sticker-size: 60px;
    bottom: -20px;
    left: -26px;
}
.note-deco-sticker--circle {
    --note-deco-tilt: 8deg;
    --sticker-color: #6fd89a;
    --sticker-size: 52px;
    top: -20px;
    left: -22px;
}
.home-about-note {
    position: relative;
    z-index: 1;
    padding: 30px 34px 34px;
    background: #FFEAB7;
    border-radius: 6px;
    border: var(--elevation-border);
    box-shadow: var(--elevation-shadow);
    transform: rotate(-1.5deg);
}
.home-about-note-title {
    margin: 0 0 12px;
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.15;
    color: #2a2616;
}
.home-about-rest {
    width: 100%;
    max-width: 600px;
    margin: clamp(72px, 9vw, 120px) auto 0;
    text-align: left;
}
.home-about-photos {
    position: relative;
    flex: 0 0 auto;
    width: 440px;
    max-width: 100%;
    min-height: 400px;
    margin-left: 6px;
    z-index: 2;
    overflow: visible;
}
.home-about-copy p {
    margin: 0;
    font-size: 0.86rem;
    line-height: 1.7;
    color: #3a3724;
}
.home-about-copy p + p {
    margin-top: 14px;
}
.home-about-copy a:not(.tool-sticker) {
    color: var(--text-color);
    font-weight: 700;
    text-decoration: underline;
    text-decoration-color: rgba(var(--brand-rgb), 0.55);
    text-underline-offset: 3px;
}
.home-about-copy a:not(.tool-sticker):hover,
.home-about-copy a:not(.tool-sticker):focus-visible {
    color: var(--accent-color);
    text-decoration-color: var(--accent-color);
}
.home-about-copy .tool-sticker {
    text-decoration: none;
    font-weight: inherit;
}
.home-about-photo-stickers {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 3;
}
.photo-deco-sticker {
    --deco-tilt: 0deg;
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    background: #ffffff;
    border: 3px solid #ffffff;
    border-radius: 14px;
    box-shadow: none;
    transform: rotate(var(--deco-tilt));
    font-size: 1.1rem;
    transition: transform 0.38s cubic-bezier(0.34, 1.35, 0.64, 1);
}
.photo-deco-sticker i {
    display: block;
    line-height: 1;
}
.photo-deco-shape--star {
    width: 0;
    height: 0;
    border-left: 11px solid transparent;
    border-right: 11px solid transparent;
    border-bottom: 20px solid #e8e258;
    filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.12));
}
.photo-deco-sticker--heart {
    --deco-tilt: -14deg;
    left: 4%;
    top: 28%;
    color: #e74c3c;
}
.photo-deco-sticker--star {
    --deco-tilt: 12deg;
    left: 6%;
    bottom: 10%;
}
.photo-deco-sticker--sparkle {
    --deco-tilt: 8deg;
    left: 18%;
    top: 58%;
    color: #f39c12;
    font-size: 1.05rem;
}
.home-about-photo-hero {
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 6;
}
.home-about-photo-bubble {
    position: absolute;
    top: -20px;
    right: 4px;
    z-index: 12;
    margin: 0;
    padding: 10px 18px 12px;
    font-size: 0.84rem;
    line-height: 1.3;
    transform: rotate(6deg);
    --bubble-tail-x: 72%;
    transition:
        transform 0.34s cubic-bezier(0.34, 1.25, 0.64, 1),
        translate 0.32s cubic-bezier(0.34, 1.56, 0.64, 1),
        scale 0.32s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.32s ease;
}
.home-about-photo-bubble:hover {
    translate: 0 -7px;
    scale: 1.05;
}
.home-about-photo-card {
    position: absolute;
    border-radius: 12px;
    overflow: hidden;
    border: var(--elevation-border);
    box-shadow: var(--elevation-shadow);
    background: var(--border-color);
    cursor: pointer;
    transition:
        box-shadow 0.34s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.34s cubic-bezier(0.22, 1, 0.36, 1);
}
.home-about-photo-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}
.home-about-photo-card--front {
    --photo-tilt: 3deg;
    position: relative;
    width: 300px;
    height: 376px;
    left: auto;
    top: auto;
    transform: rotate(var(--photo-tilt));
    z-index: 5;
}
.home-about-photo-card--back-a {
    --photo-tilt: -16deg;
    width: 196px;
    height: 246px;
    right: 252px;
    left: auto;
    top: 18px;
    transform: rotate(var(--photo-tilt));
    z-index: 2;
}
.home-about-photo-card--back-b {
    --photo-tilt: 11deg;
    width: 188px;
    height: 236px;
    right: 232px;
    left: auto;
    bottom: 12px;
    top: auto;
    transform: rotate(var(--photo-tilt));
    z-index: 3;
}
@media (prefers-reduced-motion: no-preference) {
    .home-about-photo-card:hover,
    .home-about-photo-card:focus-visible {
        transform: rotate(var(--photo-tilt)) translateY(-6px) scale(1.02);
        box-shadow: var(--elevation-shadow);
    }
    .home-about-photo-card--back-a:hover,
    .home-about-photo-card--back-a:focus-visible {
        z-index: 7;
    }
    .home-about-photo-card--back-b:hover,
    .home-about-photo-card--back-b:focus-visible {
        z-index: 7;
    }
    .home-about-photo-card--front:hover,
    .home-about-photo-card--front:focus-visible {
        z-index: 9;
    }
    .home-about-photo-card:hover img,
    .home-about-photo-card:focus-visible img {
        transform: scale(1.05);
    }
    .home-about-photo-hero:has(.home-about-photo-card:hover) .home-about-photo-bubble,
    .home-about-photo-hero:has(.home-about-photo-card:focus-visible) .home-about-photo-bubble {
        transform: rotate(6deg) translateY(-3px) scale(1.04);
    }
    .home-about-photos:has(.home-about-photo-card--back-a:hover) .photo-deco-sticker--heart,
    .home-about-photos:has(.home-about-photo-card--back-a:focus-visible) .photo-deco-sticker--heart {
        transform: rotate(var(--deco-tilt)) scale(1.12) translateY(-3px);
    }
    .home-about-photos:has(.home-about-photo-card--back-b:hover) .photo-deco-sticker--star,
    .home-about-photos:has(.home-about-photo-card--back-b:focus-visible) .photo-deco-sticker--star {
        transform: rotate(var(--deco-tilt)) scale(1.12) translateY(-3px);
    }
    .home-about-photos:has(.home-about-photo-card--front:hover) .photo-deco-sticker--sparkle,
    .home-about-photos:has(.home-about-photo-card--front:focus-visible) .photo-deco-sticker--sparkle {
        transform: rotate(var(--deco-tilt)) scale(1.12) translateY(-3px);
    }
}
@media (prefers-reduced-motion: reduce) {
    .home-about-photo-card:hover,
    .home-about-photo-card:focus-visible {
        box-shadow: var(--elevation-shadow);
    }
}
.home-about-career {
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    padding: 0 30px 64px;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 28px;
    align-items: start;
    text-align: left;
}
.home-about-copy .home-about-career,
.home-about-rest .home-about-career {
    max-width: none;
    width: 100%;
    margin: 40px 0 0;
    padding: 0;
    grid-template-columns: 1fr;
    gap: 32px;
}
.home-about-career .about-exp-group {
    grid-column: 1 / span 6;
    width: 100%;
    max-width: 610px;
    text-align: left;
}
.home-about-copy .home-about-career .about-exp-group,
.home-about-rest .home-about-career .about-exp-group {
    grid-column: 1;
    max-width: none;
}
.home-about-career .about-exp-group .about-section-heading {
    margin-bottom: 8px;
    padding-bottom: 8px;
}
.home-about-career .about-exp-group--work .about-experience-list,
.home-about-career .about-exp-group--education .about-experience-list {
    padding-left: 0;
}
.home-about-career .about-exp-group--work .about-experience-list::before,
.home-about-career .about-exp-group--education .about-experience-list::before {
    left: 6px;
}
.home-about-career .about-exp-item {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 16px 0 24px 44px;
}
.home-about-career .about-exp-group--work .about-exp-item::before,
.home-about-career .about-exp-group--education .about-exp-item::before {
    left: 1px;
    top: calc(16px + (0.68rem * 1.5) / 2 - 5px);
}
.home-about-career .about-exp-item:hover,
.home-about-career .about-exp-group--work .about-exp-item:hover,
.home-about-career .about-exp-group--education .about-exp-item:hover {
    background: transparent;
}
.about-interests-text {
    font-size: inherit;
    line-height: 1.75;
    color: var(--text-color);
}

/* Home — scroll / enter reveal */
@media (prefers-reduced-motion: no-preference) {
    @keyframes homeBubblePop {
        0% {
            opacity: 0;
            transform: scale(0.9) translateY(10px) rotate(var(--home-pop-tilt, 0deg));
        }
        100% {
            opacity: 1;
            transform: scale(1) translateY(0) rotate(var(--home-pop-tilt, 0deg));
        }
    }

    .home-reveal {
        opacity: 0;
        transform: translateY(24px);
        transition:
            opacity 0.72s cubic-bezier(0.22, 1, 0.36, 1),
            transform 0.72s cubic-bezier(0.22, 1, 0.36, 1);
        transition-delay: var(--home-reveal-delay, 0ms);
    }
    .home-reveal.is-revealed:not(.home-reveal--bubble-pop) {
        opacity: 1;
        transform: translateY(0);
    }
    /* Footer-style bubble pop — shared across home cards, text, and sections */
    .home-reveal--bubble-pop {
        opacity: 0;
        transform: scale(0.9) translateY(10px) rotate(var(--home-pop-tilt, 0deg));
        transform-origin: center center;
        transition: none;
    }
    .home-reveal--bubble-pop.is-revealed {
        animation: homeBubblePop 0.72s cubic-bezier(0.22, 1, 0.36, 1) forwards;
        animation-delay: var(--home-reveal-delay, 0ms);
    }
    .hero-title-line.home-reveal--bubble-pop,
    .sidebar-intro.home-reveal--bubble-pop,
    .projects-more-title.home-reveal--bubble-pop,
    .projects-more-intro.home-reveal--bubble-pop,
    .home-about-title.home-reveal--bubble-pop,
    .home-about-copy.home-reveal--bubble-pop,
    .home-can-bring-title.home-reveal--bubble-pop,
    .site-contact-col.home-reveal--bubble-pop,
    .site-contact-fields.home-reveal--bubble-pop {
        transform-origin: left center;
    }
    .home-header-composition.home-reveal--bubble-pop {
        --home-pop-tilt: 3deg;
        transform-origin: 58% 62%;
    }
    .home-can-bring-ai-note.home-reveal--bubble-pop {
        --home-pop-tilt: 1deg;
        transform-origin: center bottom;
    }
    .home-about-photo-bubble.home-reveal--bubble-pop {
        --home-pop-tilt: 3deg;
        transform-origin: center bottom;
    }
    .home-about-photo-card.home-reveal--bubble-pop {
        --home-pop-tilt: var(--photo-tilt, 0deg);
        transform-origin: 50% 82%;
    }
    .projects-more-card.home-reveal--bubble-pop {
        --home-pop-tilt: var(--card-tilt, 0deg);
        transform-origin: 50% 88%;
    }
    .note-deco-sticker.home-reveal--bubble-pop,
    .photo-deco-sticker.home-reveal--bubble-pop {
        --home-pop-tilt: var(--deco-tilt, 0deg);
    }
    .home-toolbox-stickers .tool-sticker.home-reveal--bubble-pop {
        --home-pop-tilt: var(--sticker-tilt, 0deg);
    }
    .home-reveal--fade {
        transform: none;
    }
    .home-reveal--fade.is-revealed {
        transform: none;
    }
    .home-reveal--pop {
        transform: scale(0.88) rotate(6deg);
    }
    .home-reveal--pop.is-revealed {
        transform: scale(1) rotate(6deg);
    }
    .home-reveal--deck:not(.is-revealed) {
        opacity: 0;
        transform:
            rotate(var(--card-tilt, 0deg))
            translateY(calc(var(--card-lift, 0px) + 72px))
            scale(0.86);
        transition:
            opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1),
            transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
        transition-delay: var(--home-reveal-delay, 0ms);
    }
    .home-reveal--photo:not(.is-revealed) {
        opacity: 0;
        transform:
            rotate(calc(var(--photo-tilt, 0deg) - 12deg))
            translateY(52px)
            scale(0.84);
        transition:
            opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
            transform 0.88s cubic-bezier(0.22, 1, 0.36, 1);
        transition-delay: var(--home-reveal-delay, 0ms);
    }
    .home-reveal--sticker:not(.is-revealed) {
        opacity: 0;
        transform:
            rotate(calc(var(--deco-tilt, 0deg) - 22deg))
            translateY(28px)
            scale(0.5);
        transition:
            opacity 0.72s cubic-bezier(0.22, 1, 0.36, 1),
            transform 0.82s cubic-bezier(0.34, 1.35, 0.64, 1);
        transition-delay: var(--home-reveal-delay, 0ms);
    }
    .home-reveal--bubble.home-reveal--pop:not(.is-revealed) {
        opacity: 0;
        transform: scale(0.68) rotate(16deg) translateY(18px);
        transition:
            opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
            transform 0.82s cubic-bezier(0.34, 1.35, 0.64, 1);
        transition-delay: var(--home-reveal-delay, 0ms);
    }
    .home-reveal--bubble.home-reveal--pop.is-revealed {
        opacity: 1;
        transform: scale(1) rotate(6deg) translateY(0);
    }
    .home-can-bring-ai-note.home-reveal--bubble.home-reveal--pop.is-revealed {
        transform: scale(1) rotate(2deg) translateY(0);
    }
    .home-header-composition.home-reveal--pop:not(.is-revealed) .home-header-composition__canvas-wrap,
    .home-header-composition.home-reveal--pop:not(.is-revealed) .home-header-composition__art {
        opacity: 0;
        transform: translateY(18px) scale(0.96);
    }
    .home-header-composition.home-reveal--pop.is-revealed .home-header-composition__canvas-wrap {
        opacity: 1;
        transform: none;
        transition:
            opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.1s,
            transform 0.62s cubic-bezier(0.22, 1, 0.36, 1) 0.1s;
    }
    .home-header-composition.home-reveal--pop.is-revealed .home-header-composition__art {
        opacity: 1;
        transform: none;
        transition:
            opacity 0.68s cubic-bezier(0.22, 1, 0.36, 1) 0.2s,
            transform 0.75s cubic-bezier(0.34, 1.2, 0.64, 1) 0.2s;
    }
    /* About photos: rise in with tilt */
    .home-about-photo-card.home-reveal--photo.is-revealed,
    .home-about-photo-card.home-reveal--bubble-pop.is-revealed {
        opacity: 1;
        transform: rotate(var(--photo-tilt, 0deg));
    }
    .home-about-photo-card.home-reveal--photo.is-revealed:hover,
    .home-about-photo-card.home-reveal--photo.is-revealed:focus-visible,
    .home-about-photo-card.home-reveal--bubble-pop.is-revealed:hover,
    .home-about-photo-card.home-reveal--bubble-pop.is-revealed:focus-visible {
        transform: rotate(var(--photo-tilt, 0deg)) translateY(-6px) scale(1.02);
    }
    .home-about-photo-card--back-a.home-reveal--photo:not(.is-revealed) {
        transform: rotate(calc(var(--photo-tilt, -16deg) - 14deg)) translate(-24px, 48px) scale(0.82);
    }
    .home-about-photo-card--back-b.home-reveal--photo:not(.is-revealed) {
        transform: rotate(calc(var(--photo-tilt, 11deg) + 10deg)) translate(20px, 56px) scale(0.82);
    }
    .home-about-photo-card--front.home-reveal--photo:not(.is-revealed) {
        transform: rotate(calc(var(--photo-tilt, 3deg) - 8deg)) translateY(64px) scale(0.88);
    }
    .home-toolbox-stickers .tool-sticker.home-reveal,
    .home-toolbox-stickers .tool-sticker.home-reveal.is-revealed,
    .home-toolbox-stickers .tool-sticker.home-reveal--bubble-pop.is-revealed {
        transform: rotate(var(--sticker-tilt, 0deg));
    }
    .home-toolbox-stickers .tool-sticker.home-reveal.is-revealed:hover,
    .home-toolbox-stickers .tool-sticker.home-reveal.is-revealed:focus-visible,
    .home-toolbox-stickers .tool-sticker.home-reveal--bubble-pop.is-revealed:hover,
    .home-toolbox-stickers .tool-sticker.home-reveal--bubble-pop.is-revealed:focus-visible {
        transform: rotate(var(--sticker-tilt, 0deg)) translateY(-4px) scale(1.06);
    }
    .projects-more-card.home-reveal.is-revealed:not(.is-active),
    .projects-more-card.home-reveal--bubble-pop.is-revealed:not(.is-active) {
        transform: rotate(var(--card-tilt, 0deg));
        transition: var(--card-motion, transform 0.82s cubic-bezier(0.22, 1, 0.36, 1));
        opacity: 1;
    }
    .projects-more-deck.is-hovering .projects-more-card.home-reveal.is-revealed:not(.is-active) {
        transform: rotate(var(--card-tilt, 0deg)) scale(0.98);
    }
    .projects-more-card.is-active,
    .projects-more-card.home-reveal.is-active,
    .projects-more-card.home-reveal.is-revealed.is-active {
        transform: rotate(0deg) translateY(-8px) scale(1.03);
        opacity: 1;
        transition: var(--card-motion, transform 0.82s cubic-bezier(0.22, 1, 0.36, 1));
    }
    .projects-more-row .projects-more-card.projects-more-card--flat.is-active,
    .projects-more-row .projects-more-card.projects-more-card--flat.home-reveal.is-revealed.is-active {
        transform: rotate(0deg) translateY(-3px);
    }
    .connect-sticker.home-reveal,
    .connect-sticker.home-reveal.is-revealed {
        transform: rotate(var(--sticker-tilt, 0deg));
    }
    .connect-sticker.home-reveal.is-revealed:hover,
    .connect-sticker.home-reveal.is-revealed:focus-visible {
        transform: rotate(var(--sticker-tilt, 0deg)) translateY(-3px) scale(1.02);
    }
    .photo-deco-sticker.home-reveal--sticker.is-revealed,
    .photo-deco-sticker.home-reveal--bubble-pop.is-revealed {
        opacity: 1;
        transform: rotate(var(--deco-tilt, 0deg));
    }
    /* Footer monster: no scroll-enter reveal */
    .site-footer-monster,
    .site-footer-monster.home-reveal,
    .site-footer-monster.home-reveal.is-revealed {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .site-footer-monster .monster-body,
    .site-footer-monster.home-reveal.is-revealed .monster-body {
        opacity: 1;
        transform: none;
        transition: transform 0.3s ease;
    }
}
@media (prefers-reduced-motion: reduce) {
    .home-reveal {
        opacity: 1;
        transform: none;
        transition: none;
        animation: none;
    }
    .home-reveal--bubble-pop.is-revealed {
        transform: scale(1) rotate(var(--home-pop-tilt, 0deg));
    }
}

/* Project Grid — waterfall (masonry columns) */
.project-grid {
    columns: 2;
    column-gap: 30px;
    padding: 30px 30px 48px;
}
.project-grid .project-card {
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
    page-break-inside: avoid;
    margin-bottom: 30px;
    width: 100%;
}
.project-grid .project-card:last-child {
    margin-bottom: 0;
}
.project-grid .project-card:nth-child(4n + 1) .image-container:not(.image-container--video) { aspect-ratio: 1 / 1; }
.project-grid .project-card:nth-child(4n + 2) .image-container:not(.image-container--video) { aspect-ratio: 1 / 1; }
.project-grid .project-card:nth-child(4n + 3) .image-container:not(.image-container--video) { aspect-ratio: 4 / 5; }
.project-grid .project-card:nth-child(4n + 4) .image-container:not(.image-container--video) { aspect-ratio: 3 / 4; }
.project-card {
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(40px);
    cursor: pointer;
}
.project-card.project-enter {
    animation: projectRise 0.6s ease-out forwards;
}
@keyframes projectRise {
    from {
        opacity: 0;
        transform: translateY(60px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.image-container {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #eee;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #777;
    font-weight: bold;
    border: 2px solid transparent;
    transition: border-color 0.3s ease, transform 0.35s ease;
}
.image-container::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.96) 100%);
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
    z-index: 1;
}
.image-container img,
.image-container video,
.next-project-img img {
    position: relative;
    z-index: 0;
    transition: transform 0.35s ease;
    transform: scale(1);
}
.image-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 8px;
}
.project-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 8px;
    padding: 18px;
    color: #fff;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 2;
    pointer-events: none;
}
.project-overlay-title {
    font-size: 1.55rem;
    line-height: 1.16;
    font-weight: 800;
    letter-spacing: -0.03em;
    text-wrap: balance;
}
.project-overlay-subtitle {
    font-size: 0.92rem;
    line-height: 1.4;
    color: rgba(255,255,255,0.9);
}
.project-overlay-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.project-overlay-tag {
    font-size: 0.62rem;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.4);
    background: rgba(255,255,255,0.12);
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    backdrop-filter: blur(4px);
}
.project-overlay-tag--audience {
    border-color: rgba(var(--brand-rgb), 0.85);
    background: rgba(var(--brand-rgb), 0.28);
    color: #fff;
    font-weight: 700;
}
/* Home featured cards: title + tags sit below the image (always visible, no hover overlay) */
.project-grid .project-card .image-container { margin-bottom: 0; }
.project-grid .project-card .image-container::before { display: none; }
.project-grid .project-card .image-container.image-container--video {
    aspect-ratio: 12 / 9;
    display: block;
    height: auto;
    background: #0a0a0a;
}
.project-grid .project-card .image-container.image-container--video video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center center;
}
.project-card-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px 2px 0;
}
.project-card-title {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.02em;
    color: var(--text-color);
    transition: color 0.2s ease;
}
.project-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.project-card-tags .project-overlay-tag {
    color: var(--secondary-text);
    border-color: var(--border-color);
    background: transparent;
    backdrop-filter: none;
}
.project-card-tags .project-overlay-tag--audience {
    color: var(--text-color);
    border-color: var(--accent-color);
    background: var(--accent-green-soft);
    font-weight: 700;
}

.project-grid .project-card:hover .image-container {
    border-color: transparent;
    transform: none;
}
.project-card:hover .image-container { border-color: var(--accent-color); }
.project-card:hover .image-container {
    transform: none;
}
.project-card:hover .image-container::before,
.project-card:hover .project-overlay {
    opacity: 1;
}
.project-card:hover .project-overlay {
    transform: translateY(0);
}
.project-card:hover .image-container img,
.project-card:hover .image-container video,
.next-project-card:hover .next-project-img img {
    transform: scale(1);
    animation: none;
}
.project-card:active .image-container {
    transform: none;
}
.project-card:active .image-container img,
.project-card:active .image-container video,
.next-project-card:active .next-project-img img {
    transform: scale(1);
}
@keyframes projectWindHover {
    0% {
        transform: scale(1.06) translateY(0) rotate(0deg);
    }
    50% {
        transform: scale(1.08) translateY(-4px) rotate(-0.6deg);
    }
    100% {
        transform: scale(1.06) translateY(0) rotate(0deg);
    }
}
.project-shapes {
    display: flex;
    gap: 6px;
    margin-top: 10px;
}
.project-shapes .shape-circle,
.project-shapes .shape-square,
.project-shapes .shape-triangle {
    transform: scale(0.8);
}
.project-shapes .shape-circle {
    background-color: rgba(var(--brand-rgb), 0.85);
}
.project-shapes .shape-square {
    background-color: rgba(74, 85, 224, 0.9);
}
.project-shapes .shape-triangle {
    border-bottom-color: rgba(232, 226, 88, 0.95);
}
@keyframes projectWindHover {
    0% {
        transform: scale(1.06) translateY(0) rotate(0deg);
    }
    50% {
        transform: scale(1.08) translateY(-4px) rotate(-0.6deg);
    }
    100% {
        transform: scale(1.06) translateY(0) rotate(0deg);
    }
}
.project-info { display: none; }
.project-info h3 { font-size: 1.1rem; margin-bottom: 2px; }
.project-subtitle { font-size: 0.85rem; color: var(--secondary-text); margin-bottom: 8px; display: block; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 5px; }
.tag { font-size: 0.65rem; padding: 3px 10px; border: 1px solid var(--border-color); border-radius: 20px; color: var(--secondary-text); text-transform: uppercase; }
.project-card:hover .tag { border-color: var(--accent-color); color: var(--accent-color); }

/* Home projects footer CTA — fills remaining vertical space above footer */
.projects-cta {
    position: relative;
    padding: 88px 30px 192px;
    flex: 1;
    border-top: 1px solid var(--border-color);
    margin-top: 32px;
    margin-bottom: 0;
    background: var(--bg-color);
    overflow: visible;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 1;
}

/* Falling shapes (gravity animation) */
.projects-cta-falling-shapes {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}
.projects-cta .projects-cta-title,
.projects-cta .projects-cta-body,
.projects-cta .projects-cta-buttons,
.projects-cta .projects-cta-hint {
    position: relative;
    z-index: 1;
}
.falling-shape {
    position: absolute;
    top: -400px;
    animation: fallingGravity 8s ease-in infinite;
    will-change: transform;
}
.falling-shape-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--brand);
    left: 85%;
    animation-delay: 0s;
}
.falling-shape-triangle {
    width: 0;
    height: 0;
    border-left: 35px solid transparent;
    border-right: 35px solid transparent;
    border-bottom: 60px solid #E8E258;
    left: 75%;
    animation-delay: 2.5s;
}
.falling-shape-square {
    width: 50px;
    height: 50px;
    background: #4A55E0;
    left: 90%;
    animation-delay: 1.2s;
}
.falling-shape-2 {
    left: 8%;
    animation-delay: 3.8s;
    width: 45px;
    height: 45px;
}
.falling-shape-3 {
    left: 15%;
    animation-delay: 5.2s;
    border-left-width: 28px;
    border-right-width: 28px;
    border-bottom-width: 48px;
}
.falling-shape-4 {
    left: 5%;
    animation-delay: 4.5s;
    width: 40px;
    height: 40px;
}
@keyframes fallingGravity {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }
    12% {
        opacity: 0.9;
    }
    100% {
        transform: translateY(calc(100vh + 550px)) rotate(360deg);
        opacity: 0.7;
    }
}
.projects-cta-title {
    font-size: 1.8rem;
    font-weight: 800;
    font-family: 'Montserrat', sans-serif;
    margin-bottom: 10px;
}
.projects-cta-body {
    font-size: 1rem;
    color: var(--secondary-text);
    margin-bottom: 14px;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}
.projects-cta-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}
.projects-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid var(--accent-color);
    background: var(--accent-color);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.projects-cta-btn:hover {
    transform: translateY(-1px);
    background-color: var(--brand-deep);
}
.projects-cta-btn-secondary {
    background: transparent;
    color: var(--accent-color);
}
.projects-cta-btn-secondary:hover {
    background: rgba(var(--brand-rgb), 0.08);
}
.projects-cta-buttons {
    margin-bottom: 48px;
}
.projects-cta-hint {
    margin-top: auto;
    margin-bottom: 10px;
    z-index: 3;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--secondary-text);
    opacity: 0.6;
    animation: hintBob 2s ease-in-out infinite;
}
@keyframes hintBob {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(4px); }
}

/* Components */
#progress-bar { position: fixed; bottom: 0; left: 0; height: 4px; background: var(--accent-color); width: 0%; z-index: 9999; }

/* Home — fixed top navigation */
.site-top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9000;
    /* width: 100%; */
    max-width: none;
    transform: none;
    padding: 48px 48px 0;
    box-sizing: border-box;
    pointer-events: none;
    /* Stay hidden until JS positions/docks the nav, so the browser never paints
       the full-width state and animates it down to the docked width on refresh.
       The animation is a safety net: reveal after 1s even if JS never runs. */
    visibility: hidden;
    animation: siteTopNavSafetyReveal 0s linear 1s forwards;
    /* Only the scroll auto-hide (transform/opacity) animates. The dock position
       (left/width/padding) must NEVER transition, or re-measuring the sidebar on
       load animates the nav from full width down to the docked width on refresh. */
    transition:
        transform 0.32s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.28s ease;
}
.site-top-nav.is-nav-ready {
    visibility: visible;
    animation: none;
}
@keyframes siteTopNavSafetyReveal {
    to { visibility: visible; }
}
/* Desktop keeps the nav visible (it becomes the vertical rail on scroll), so the
   scroll-hide is scoped to mobile only — nav slides up on scroll-down and back
   down on scroll-up (JS toggles .is-scroll-hidden in initScrollLogic). */
@media (max-width: 1200px) {
    .site-top-nav--auto-hide.is-scroll-hidden {
        transform: translateY(calc(-100% - 48px));
        opacity: 0;
    }
}
.site-top-nav--auto-hide.is-scroll-hidden .site-top-nav__inner {
    pointer-events: none;
}

/* Docked top nav — desktop only (all pages with top nav) */
@media (min-width: 1201px) {
    /* Dock geometry applied to the base nav (not just --docked) so the nav has a
       stable width from the very first paint — it is NEVER full width on desktop,
       which removes the full-width→narrow shrink on refresh no matter when JS or
       the home splash screen reveals the nav.
       The width mirrors the sidebar column's own formula (16% + 34px), so the nav
       (and the hamburger inside it) always lines up with the sidebar's right edge
       responsively — ~309.68px at ~1723px wide, and matching at every size. */
    .site-top-nav {
        left: var(--case-page-pad-x, 48px);
        right: auto;
        width: calc(16vw + 34px);
        padding: 48px 0 0;
    }

    /* The pill fills the fixed nav width exactly, so on project pages the
       hamburger button is contained inside 309.68px and never widens the bar. */
    .site-top-nav__inner {
        width: 100%;
        box-sizing: border-box;
    }
    .site-top-nav__menu-toggle {
        flex-shrink: 0;
    }

    .site-top-nav.site-top-nav--docked {
        right: auto;
        padding: 48px 0 0;
    }

    body.is-project-page .site-top-nav.site-top-nav--docked,
    body:has(.app-root-project) .site-top-nav.site-top-nav--docked {
        transform: translateY(0);
        opacity: 1;
    }

    .site-top-nav.site-top-nav--docked .site-top-nav__inner {
        /* width: 100%; */
        box-sizing: border-box;
        justify-content: flex-start;
        gap: 6px;
        pointer-events: auto;
    }

    .site-top-nav.site-top-nav--docked .site-top-nav__links {
        display: flex;
        margin-left: auto;
        gap: 2px;
    }

    body.is-project-page .site-top-nav--auto-hide.is-scroll-hidden .site-top-nav__links,
    body:has(.app-root-project) .site-top-nav--auto-hide.is-scroll-hidden .site-top-nav__links {
        display: flex;
        flex: 1 1 auto;
        min-width: 0;
        margin-left: auto;
        justify-content: flex-end;
        gap: 0;
        max-width: 0;
        opacity: 0;
        overflow: hidden;
        pointer-events: none;
        transition:
            max-width 0.42s cubic-bezier(0.22, 1, 0.36, 1),
            opacity 0.3s ease,
            gap 0.42s cubic-bezier(0.22, 1, 0.36, 1);
    }

    body.is-project-page .site-top-nav--auto-hide.is-scroll-hidden .site-top-nav__link,
    body:has(.app-root-project) .site-top-nav--auto-hide.is-scroll-hidden .site-top-nav__link {
        opacity: 0;
        transform: translateX(8px);
        transition:
            opacity 0.26s ease,
            transform 0.26s cubic-bezier(0.22, 1, 0.36, 1);
    }

    body.is-project-page .site-top-nav--auto-hide.is-scroll-hidden .site-top-nav__menu-toggle,
    body:has(.app-root-project) .site-top-nav--auto-hide.is-scroll-hidden .site-top-nav__menu-toggle {
        display: inline-flex;
        margin-left: 0;
        flex-shrink: 0;
        transition: transform 0.22s ease, background-color 0.18s ease, color 0.18s ease;
    }

    body.is-project-page .site-top-nav--auto-hide.is-scroll-hidden:not(.is-menu-open) .site-top-nav__menu-toggle,
    body:has(.app-root-project) .site-top-nav--auto-hide.is-scroll-hidden:not(.is-menu-open) .site-top-nav__menu-toggle {
        margin-left: auto;
    }

    body.is-project-page .site-top-nav--auto-hide.is-scroll-hidden.is-menu-open .site-top-nav__links,
    body:has(.app-root-project) .site-top-nav--auto-hide.is-scroll-hidden.is-menu-open .site-top-nav__links {
        max-width: 100%;
        opacity: 1;
        gap: 2px;
        pointer-events: auto;
    }

    body.is-project-page .site-top-nav--auto-hide.is-scroll-hidden.is-menu-open .site-top-nav__link,
    body:has(.app-root-project) .site-top-nav--auto-hide.is-scroll-hidden.is-menu-open .site-top-nav__link {
        opacity: 1;
        transform: translateX(0);
    }

    body.is-project-page .site-top-nav--auto-hide.is-scroll-hidden.is-menu-open .site-top-nav__link:nth-child(1),
    body:has(.app-root-project) .site-top-nav--auto-hide.is-scroll-hidden.is-menu-open .site-top-nav__link:nth-child(1) {
        transition-delay: 0.04s;
    }

    body.is-project-page .site-top-nav--auto-hide.is-scroll-hidden.is-menu-open .site-top-nav__link:nth-child(2),
    body:has(.app-root-project) .site-top-nav--auto-hide.is-scroll-hidden.is-menu-open .site-top-nav__link:nth-child(2) {
        transition-delay: 0.08s;
    }

    body.is-project-page .site-top-nav--auto-hide.is-scroll-hidden.is-menu-open .site-top-nav__link:nth-child(3),
    body:has(.app-root-project) .site-top-nav--auto-hide.is-scroll-hidden.is-menu-open .site-top-nav__link:nth-child(3) {
        transition-delay: 0.12s;
    }

    body.is-project-page .site-top-nav--auto-hide.is-scroll-hidden.is-menu-open .site-top-nav__link:nth-child(4),
    body:has(.app-root-project) .site-top-nav--auto-hide.is-scroll-hidden.is-menu-open .site-top-nav__link:nth-child(4) {
        transition-delay: 0.16s;
    }

    body.is-project-page .site-top-nav--auto-hide.is-scroll-hidden.is-menu-open .site-top-nav__menu-toggle,
    body:has(.app-root-project) .site-top-nav--auto-hide.is-scroll-hidden.is-menu-open .site-top-nav__menu-toggle {
        display: inline-flex;
        margin-left: 0;
        flex-shrink: 0;
    }

    body.is-project-page .site-top-nav--auto-hide.is-scroll-hidden.is-menu-open .site-top-nav__menu-toggle-icon--open,
    body:has(.app-root-project) .site-top-nav--auto-hide.is-scroll-hidden.is-menu-open .site-top-nav__menu-toggle-icon--open {
        display: none;
    }

    body.is-project-page .site-top-nav--auto-hide.is-scroll-hidden.is-menu-open .site-top-nav__menu-toggle-icon--close,
    body:has(.app-root-project) .site-top-nav--auto-hide.is-scroll-hidden.is-menu-open .site-top-nav__menu-toggle-icon--close {
        display: block;
    }

    body.is-project-page .site-top-nav--auto-hide.is-scroll-hidden:not(.is-menu-open) .site-top-nav__menu-toggle-icon--close,
    body:has(.app-root-project) .site-top-nav--auto-hide.is-scroll-hidden:not(.is-menu-open) .site-top-nav__menu-toggle-icon--close {
        display: none;
    }

    body.is-project-page .site-top-nav.site-top-nav--docked.is-scroll-hidden,
    body:has(.app-root-project) .site-top-nav.site-top-nav--docked.is-scroll-hidden {
        right: auto;
        padding: 48px 0 0;
        transform: translateY(0);
        opacity: 1;
    }

    body.is-project-page .site-top-nav.site-top-nav--docked.is-scroll-hidden .site-top-nav__brand,
    body:has(.app-root-project) .site-top-nav.site-top-nav--docked.is-scroll-hidden .site-top-nav__brand {
        gap: 0;
    }
}
.site-top-nav__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    /* width: 100%; */
    box-sizing: border-box;
    padding: 7px 10px 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid #E0E0E0;
    box-shadow: none;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    pointer-events: auto;
}
.site-top-nav__brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    text-decoration: none;
    color: var(--text-color);
}
.site-top-nav__avatar {
    flex: 0 0 auto;
    display: block;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    overflow: hidden;
}
.site-top-nav__avatar svg {
    display: block;
    width: 100%;
    height: 100%;
}
.site-top-nav__pupil {
    transform-box: fill-box;
    transform-origin: center;
    transition: transform 0.1s ease-out;
}
.site-top-nav__name {
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    line-height: 1;
    white-space: nowrap;
}
.site-top-nav__links {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.site-top-nav__link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    min-height: 32px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    color: rgba(17, 17, 17, 0.72);
    transition: color 0.18s ease, background-color 0.18s ease;
}
.site-top-nav__link-label {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    transform: translateX(-50%) translateY(4px);
    opacity: 0;
    pointer-events: none;
    white-space: nowrap;
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px solid rgba(17, 17, 17, 0.1);
    background: #ffffff;
    color: var(--text-color);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.site-top-nav__link:hover .site-top-nav__link-label,
.site-top-nav__link:focus-visible .site-top-nav__link-label {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.site-top-nav__link-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1rem;
    height: 1rem;
    font-size: 0.88rem;
    line-height: 1;
}
.site-top-nav__link-icon i {
    display: block;
    line-height: 1;
}
.site-top-nav__link:hover,
.site-top-nav__link:focus-visible {
    color: var(--text-color);
    background: rgba(17, 17, 17, 0.05);
    outline: none;
}
.site-top-nav__link--current,
.site-top-nav__link[aria-current="page"] {
    color: var(--text-color);
    background: rgba(17, 17, 17, 0.06);
}
.site-top-nav__menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: rgba(17, 17, 17, 0.72);
    font-size: 0.95rem;
    line-height: 1;
    cursor: pointer;
    transition: color 0.18s ease, background-color 0.18s ease;
}
.site-top-nav__menu-toggle:hover,
.site-top-nav__menu-toggle:focus-visible {
    color: var(--text-color);
    background: rgba(17, 17, 17, 0.05);
    outline: none;
}
.site-top-nav__menu-toggle-icon--close {
    display: none;
}
.site-top-nav__menu-toggle-icon svg {
    display: block;
}
@media (prefers-reduced-motion: reduce) {
    .site-top-nav {
        transition: none;
    }
    .site-top-nav--auto-hide.is-scroll-hidden {
        transform: none;
        opacity: 1;
    }
    @media (min-width: 1201px) {
        body.is-project-page .site-top-nav--auto-hide.is-scroll-hidden,
        body:has(.app-root-project) .site-top-nav--auto-hide.is-scroll-hidden {
            transform: none;
            opacity: 1;
        }
        body.is-project-page .site-top-nav--auto-hide.is-scroll-hidden.is-menu-open,
        body:has(.app-root-project) .site-top-nav--auto-hide.is-scroll-hidden.is-menu-open {
            transform: none;
        }
        body.is-project-page .site-top-nav--auto-hide.is-scroll-hidden .site-top-nav__links,
        body:has(.app-root-project) .site-top-nav--auto-hide.is-scroll-hidden .site-top-nav__links,
        body.is-project-page .site-top-nav--auto-hide.is-scroll-hidden .site-top-nav__link,
        body:has(.app-root-project) .site-top-nav--auto-hide.is-scroll-hidden .site-top-nav__link {
            transition: none;
        }
    }
}
.app-root-home .home-page-header {
    padding-top: 106px;
}
@media (min-width: 1201px) {
    .app-root-home .home-page-header {
        padding-top: 146px;
        /* Left-align the header instead of centering it in the 1280px container.
           The left padding aligns the hero text with the nav LOGO (avatar), which
           sits 13px inside the nav's left edge (nav 1px border + 12px pill pad). */
        max-width: none;
        margin-left: 0;
        margin-right: 0;
        padding-left: calc(var(--case-page-pad-x, 48px) + 13px);
        padding-right: var(--case-page-pad-x, 48px);
        /* Aside column holds the shape composition; scales with the viewport and
           caps on large screens. */
        grid-template-columns: minmax(0, 1fr) minmax(340px, min(560px, 40vw));
    }
    .app-root-home .home-page-header-aside {
        max-width: 560px;
        padding-right: 0;
    }
    .app-root-home .home-header-composition {
        max-width: 560px;
        margin-right: 0;
    }
    .app-root-home .home-header-composition__float {
        width: min(100%, 540px);
    }
    /* Subtle gray grid behind the floating shapes (design-canvas backdrop). It
       tilts with the composition and sits under the shapes (art is z-index 1). */
    .app-root-home .home-header-composition__float::before {
        content: "";
        position: absolute;
        inset: -6% -10%;
        z-index: 0;
        pointer-events: none;
        border-radius: 6px;
        background-image:
            linear-gradient(to right, rgba(17, 17, 17, 0.07) 1px, transparent 1px),
            linear-gradient(to bottom, rgba(17, 17, 17, 0.07) 1px, transparent 1px);
        background-size: 34px 34px;
    }

    /* Vertical nav rail — while the featured-work section is centered in view, JS
       adds .is-nav-rail and the top nav morphs into a vertical icon rail pinned to
       the left edge and vertically centered. Centered with top/bottom:0 + auto
       margins (transform is reserved for the auto-hide animation). */
    .site-top-nav.is-nav-rail {
        width: auto;
        height: max-content;
        padding: 0;
        left: var(--case-page-pad-x, 48px);
        top: 0;
        bottom: 0;
        margin-top: auto;
        margin-bottom: auto;
        transform: none;
        opacity: 1;
    }
    .site-top-nav.is-nav-rail .site-top-nav__inner {
        flex-direction: column;
        width: auto;
        gap: 10px;
        padding: 12px 9px;
        justify-content: center;
    }
    .site-top-nav.is-nav-rail .site-top-nav__link-label {
        left: calc(100% + 10px);
        bottom: auto;
        top: 50%;
        transform: translateY(-50%) translateX(-4px);
    }
    .site-top-nav.is-nav-rail .site-top-nav__link:hover .site-top-nav__link-label,
    .site-top-nav.is-nav-rail .site-top-nav__link:focus-visible .site-top-nav__link-label {
        transform: translateY(-50%) translateX(0);
    }
    .site-top-nav.is-nav-rail .site-top-nav__links {
        flex-direction: column;
        gap: 6px;
        margin-left: 0;
    }
    /* Crossfade while the nav switches between horizontal and vertical layouts —
       the layout swap happens in JS while the nav is faded out (opacity already
       transitions on .site-top-nav). */
    .site-top-nav.is-nav-switching {
        opacity: 0;
    }
}

/* Hero composition without the portrait photo: drop the photo and the Figma
   editor frame (empty artboard, selection, handles, measurements) and keep only
   the playful floating shapes + labels as decoration. Selectors are scoped under
   .home-header-composition to out-specify the frame's own modifier rules. */
.home-header-composition__art .comp-portrait {
    display: none;
}
.home-header-composition .home-header-composition__canvas,
.home-header-composition .home-header-composition__selection,
.home-header-composition .home-header-composition__frame,
.home-header-composition .home-header-composition__measure,
.home-header-composition .home-header-composition__tick {
    display: none;
}
/* Googly eyes on select shapes — pupils follow the cursor (see initHomeHeader
   Composition). Same easing as the nav logo pupils. */
.home-header-composition__art .comp-pupil {
    transform-box: fill-box;
    transform-origin: center;
    transition: transform 0.1s ease-out;
}
@media (max-width: 520px) {
    .site-top-nav {
        padding: 48px 20px 0;
    }
    .site-top-nav__inner {
        gap: 12px;
        padding: 7px 10px 7px 12px;
    }
    .site-top-nav__name {
        font-size: 0.74rem;
    }
    .site-top-nav__link {
        min-height: 30px;
        padding: 0 10px;
        font-size: 0.76rem;
    }
    .app-root-home .home-page-header {
        padding-top: 106px;
    }
    .content-wrapper.sidebar-compact-scope--project {
        --project-nav-top: 48px;
        --project-nav-bar-height: 42px;
        --project-hero-nav-gap: 14px;
    }
}


.theme-toggle { background: none; border: none; font-size: 1.2rem; cursor: pointer; color: var(--text-color); }
.visit-btn { display: inline-block; padding: 15px 25px; background: var(--text-color); color: var(--bg-color); text-decoration: none; font-weight: bold; border-radius: 8px; text-align: center; width: 100%; }

/* Back to Top Button */
.back-to-top {
    position: fixed; bottom: 80px; right: 30px;
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--text-color); color: var(--bg-color);
    border: none; font-size: 1rem;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; z-index: 999;
    opacity: 0; visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s, background-color 0.3s, color 0.3s;
}
.back-to-top.show { opacity: 1; visibility: visible; }

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-color);
    text-decoration: none;
    margin-bottom: 30px;
    text-transform: uppercase;
    padding: 8px 14px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    width: fit-content;
    transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}
.back-btn:hover {
    color: var(--accent-color);
    border-color: var(--accent-color);
    background-color: rgba(var(--brand-rgb), 0.08);
}
.case-hero-img {
    width: 100%;
    height: auto;
    aspect-ratio: 2.63 / 1;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-weight: bold;
    font-size: 1.5rem;
    margin-bottom: 0;
    overflow: hidden;
}
.case-hero {
    position: relative;
}
.case-hero-meta {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    padding: 0;
    border-bottom: none;
    background: rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.case-hero-meta-inner {
    width: 100%;
    display: grid;
    gap: 0;
    border-top: none;
    background: transparent;
}
.case-hero-meta-inner--cols-1 {
    grid-template-columns: minmax(0, 1fr);
}
.case-hero-meta-inner--cols-2 {
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
}
.case-hero-meta-inner--cols-2:has(.case-hero-meta-item--tools):has(.case-hero-meta-item--team) {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
}
.case-hero-meta-inner--cols-3 {
    grid-template-columns: minmax(0, 3fr) minmax(0, 4fr) minmax(0, 5fr);
}
.case-hero-meta-item {
    min-width: 0;
    padding: 22px 32px;
    border-right: none;
    background: transparent;
}
.case-hero-meta-item:only-child {
    grid-column: 1 / -1;
}
.case-hero-meta-item + .case-hero-meta-item {
    border-left: 1px solid rgba(255, 255, 255, 0.28);
}
.case-hero-meta-label {
    display: block;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.82);
    letter-spacing: 0.12em;
    margin-bottom: 8px;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.45);
}
.case-hero-meta-item--tools .case-hero-meta-label,
.case-hero-meta-item--team .case-hero-meta-label {
    font-size: 0.9rem;
    text-transform: none;
    letter-spacing: 0.01em;
    color: #ffffff;
}
.case-hero-meta-value {
    display: block;
    font-size: 0.84rem;
    line-height: 1.55;
    color: #ffffff;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}
.case-hero-meta-tools {
    display: block;
}
.case-hero-meta-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.case-hero-meta-list li {
    font-size: 0.84rem;
    line-height: 1.55;
    color: #ffffff;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}

/* Project pages — unified canvas (sidebar + sections, no dividers) */
.content-wrapper.sidebar-compact-scope--project {
    --case-page-pad-x: 48px;
    --project-sidebar-gap: 14px;
    --project-nav-top: 48px;
    --project-nav-bar-height: 46px;
    --project-hero-nav-gap: 14px;
    --project-top-clearance: calc(var(--project-nav-top) + var(--project-nav-bar-height) + var(--project-hero-nav-gap));
    background: var(--bg-color);
    --problem-color: var(--text-color);
}

@media (min-width: 1201px) {
    .content-wrapper.sidebar-compact-scope--project {
        --project-nav-top: 48px;
    }
}

.content-wrapper.sidebar-compact-scope--project .lcm-fail,
.content-wrapper.sidebar-compact-scope--project .p2s-decision-card-label.removed {
    color: var(--text-color);
}

.content-wrapper.sidebar-compact-scope--project .right-panel,
.content-wrapper.sidebar-compact-scope--project .scroll-area,
.content-wrapper.sidebar-compact-scope--project .single-page-wrapper {
    background: var(--bg-color);
}

@media (min-width: 1201px) {
    .content-wrapper.sidebar-compact-scope--project .right-panel {
        min-height: 0;
    }

    .content-wrapper.sidebar-compact-scope--project .scroll-area {
        flex: 1 1 0;
        min-height: 0;
        height: 0;
        overflow-y: auto;
        overflow-x: hidden;
    }
}

.content-wrapper.sidebar-compact-scope--project .sidebar {
    border: none;
    background: transparent;
    background-image: none;
    box-shadow: none;
    border-radius: 0;
    margin: var(--project-top-clearance) 0 32px var(--case-page-pad-x);
    align-self: stretch;
    min-height: calc(100vh - var(--project-top-clearance) - 32px);
    height: calc(100vh - var(--project-top-clearance) - 32px);
    max-height: calc(100vh - var(--project-top-clearance) - 32px);
    box-sizing: border-box;
    padding: 0;
    gap: 14px;
}

.content-wrapper.sidebar-compact-scope--project .sidebar-top,
.content-wrapper.sidebar-compact-scope--project .sidebar-bottom-block {
    box-sizing: border-box;
    border: 1px solid #E0E0E0;
    border-radius: 20px;
    box-shadow: none;
}

.content-wrapper.sidebar-compact-scope--project .sidebar-top {
    flex: 0 0 auto;
    min-height: 0;
    overflow-y: visible;
    background-color: #f7f7f5;
    background-image: radial-gradient(rgba(0, 0, 0, 0.09) 1.25px, transparent 1.25px);
    background-size: 16px 16px;
    background-position: center center;
    padding: 24px 18px 20px;
}

.content-wrapper.sidebar-compact-scope--project .sidebar-bottom-block {
    flex: 0 0 auto;
    margin-top: 0;
    background-color: #ffffff;
    background-image: none;
    padding: 0 16px;
}

.content-wrapper.sidebar-compact-scope--project .sidebar-bottom-block:empty {
    display: none;
}

.content-wrapper.sidebar-compact-scope--project .sidebar-scroll-spy {
    margin-top: 0;
    padding: 20px 0;
    border-top: none;
}

@media (min-width: 1201px) {
    .content-wrapper.sidebar-compact-scope--project .sidebar {
        overflow-y: hidden;
        overflow-x: visible;
    }

    .content-wrapper.sidebar-compact-scope--project .sidebar-top {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
    }

    .content-wrapper.sidebar-compact-scope--project .sidebar-bottom-block {
        flex: 0 0 auto;
        position: relative;
        z-index: 25;
        align-self: stretch;
        width: 100%;
    }

    .content-wrapper.sidebar-compact-scope--project .sidebar-scroll-spy {
        position: relative;
        z-index: 25;
        width: 100%;
        background: #ffffff;
    }
}

.content-wrapper.sidebar-compact-scope--project .sidebar-visit-wrap {
    margin-top: 0;
    padding: 0 0 16px;
    border-top: 1px solid #E0E0E0;
}

.content-wrapper.sidebar-compact-scope--project .back-btn.connect-sticker {
    --sticker-tilt: 0deg;
    font-size: 0.62rem;
    letter-spacing: 0.05em;
    padding: 5px 10px;
    gap: 6px;
    margin-bottom: 18px;
    transform: none;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.content-wrapper.sidebar-compact-scope--project .back-btn.connect-sticker:hover,
.content-wrapper.sidebar-compact-scope--project .back-btn.connect-sticker:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(0, 0, 0, 0.16);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.content-wrapper.sidebar-compact-scope--project .hero-text .sidebar-meta-value {
    margin-bottom: 20px;
}

.content-wrapper.sidebar-compact-scope--project .sidebar-tags {
    gap: 6px 8px;
    margin-bottom: 12px;
}

.content-wrapper.sidebar-compact-scope--project .sidebar-tag {
    font-size: 0.56rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 3px 9px 4px;
    border-radius: 4px;
    color: #555555;
    background: rgba(255, 255, 255, 0.45);
    border: 1px solid #c8c6c0;
    box-shadow: none;
    transform: none;
}

.content-wrapper.sidebar-compact-scope--project .case-section,
.content-wrapper.sidebar-compact-scope--project .case-section.case-section-alt,
.content-wrapper.sidebar-compact-scope--project .case-section.case-section--problem {
    border-bottom: none;
    background: transparent;
}

.content-wrapper.sidebar-compact-scope--project .case-section {
    padding-left: 0;
    padding-right: var(--case-page-pad-x);
}

/* Project case content: headings and labels use semibold (600) max — see typography cap at EOF */

/* Project page h2 — match overview hero headline style */
.content-wrapper.sidebar-compact-scope--project .right-panel :is(
    h2:not(.next-projects-title),
    .case-section-title,
    .case-overview-title,
    .p2s-section-title-main,
    .law-title,
    .uav-title,
    .uav-hero-title,
    .qb-title,
    .lt-title,
    .mag-title,
    .lcm-title,
    .un-title,
    .wn-title
) {
    max-width: none;
    width: 100%;
    font-weight: 600;
    line-height: 1.5;
    letter-spacing: 0.01em;
    margin: 0;
    font-size: 1.35rem;
    color: var(--text-color);
}

.content-wrapper.sidebar-compact-scope--project .right-panel .next-projects-title {
    margin-bottom: 24px;
}

/* Project page h3 */
.content-wrapper.sidebar-compact-scope--project .right-panel :is(
    h3,
    .case-phase-block-title,
    .p2s-phase-block-title
) {
    font-weight: 600;
    line-height: 1.5;
}

.content-wrapper.sidebar-compact-scope--project .hero-text h1 {
    font-weight: 600;
}

.content-wrapper.sidebar-compact-scope--project .case-hero {
    position: static;
    padding: var(--project-top-clearance) var(--case-page-pad-x) 0 0;
}

.content-wrapper.sidebar-compact-scope--project .case-hero-img {
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 0;
}

.content-wrapper.sidebar-compact-scope--project .case-hero-meta {
    position: static;
    left: auto;
    right: auto;
    bottom: auto;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding: 16px 24px 4px;
}

.content-wrapper.sidebar-compact-scope--project .case-hero-meta-inner {
    gap: 0;
    align-items: stretch;
}

.content-wrapper.sidebar-compact-scope--project .case-hero-meta-item {
    padding: 0;
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: start;
    justify-content: start;
    align-self: stretch;
    height: 100%;
    min-height: 100%;
    text-align: left;
}

.content-wrapper.sidebar-compact-scope--project .case-hero-meta-inner--cols-2:has(.case-hero-meta-item--timeline) {
    grid-template-columns: minmax(0, 2.5fr) minmax(0, 5fr);
}

.content-wrapper.sidebar-compact-scope--project .case-hero-meta-inner--cols-2:has(.case-hero-meta-item--tools):has(.case-hero-meta-item--team) {
    grid-template-columns: minmax(0, 1.45fr) minmax(0, 0.75fr);
}

.content-wrapper.sidebar-compact-scope--project .case-hero-meta-inner--cols-2:has(.case-hero-meta-item--timeline):has(.case-hero-meta-item--team):not(:has(.case-hero-meta-item--tools)) {
    grid-template-columns: minmax(0, 2.5fr) minmax(0, 3fr);
}

.content-wrapper.sidebar-compact-scope--project .case-hero-meta-inner--cols-3 {
    grid-template-columns: minmax(0, 2.5fr) minmax(0, 5fr) minmax(0, 2.25fr);
}

.content-wrapper.sidebar-compact-scope--project .case-hero-meta-list {
    align-items: start;
}

.content-wrapper.sidebar-compact-scope--project .case-hero-meta-item:not(:last-child) {
    padding-right: 24px;
}

.content-wrapper.sidebar-compact-scope--project .case-hero-meta-item + .case-hero-meta-item {
    border-left: 1px solid var(--border-color);
    padding-left: 24px;
}

.content-wrapper.sidebar-compact-scope--project .case-hero-meta-label {
    color: var(--secondary-text);
    text-shadow: none;
    font-size: 0.56rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 4px;
}

.content-wrapper.sidebar-compact-scope--project .case-hero-meta-item--tools .case-hero-meta-label,
.content-wrapper.sidebar-compact-scope--project .case-hero-meta-item--team .case-hero-meta-label {
    color: var(--secondary-text);
    font-size: 0.56rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.content-wrapper.sidebar-compact-scope--project .case-hero-meta-value,
.content-wrapper.sidebar-compact-scope--project .case-hero-meta-tools,
.content-wrapper.sidebar-compact-scope--project .case-hero-meta-list li {
    color: var(--text-color);
    text-shadow: none;
    font-size: 0.78rem;
    line-height: 1.4;
}

.content-wrapper.sidebar-compact-scope--project .next-projects-section {
    border-top: none;
    padding: 40px var(--case-page-pad-x) 40px 0;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.content-wrapper.sidebar-compact-scope--project .next-projects-section > .next-projects-title,
.content-wrapper.sidebar-compact-scope--project .next-projects-section > .next-projects-grid {
    width: 100%;
    max-width: 900px;
    box-sizing: border-box;
}

/* Shared overview hero — align section padding with other project case sections */
.content-wrapper.sidebar-compact-scope--project .case-section.case-overview-hero,
.content-wrapper.sidebar-compact-scope--project .case-section.p2s-overview-hero {
    padding-left: 0;
    padding-right: var(--case-page-pad-x);
    overflow: hidden;
}

.content-wrapper.sidebar-compact-scope--project .case-overview-hero-inner,
.content-wrapper.sidebar-compact-scope--project .p2s-overview-hero-inner {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
}

.content-wrapper.sidebar-compact-scope--project .case-overview-hero-text,
.content-wrapper.sidebar-compact-scope--project .p2s-overview-hero-text {
    display: flex;
    flex-direction: column;
    gap: 32px;
    justify-content: flex-start;
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
    padding: 0;
    box-sizing: border-box;
}

.content-wrapper.sidebar-compact-scope--project .case-overview-hero-head,
.content-wrapper.sidebar-compact-scope--project .p2s-overview-hero-head {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.content-wrapper.sidebar-compact-scope--project .p2s-scenario-flow-wrap {
    margin: 0;
    width: 100%;
}

.content-wrapper.sidebar-compact-scope--project .p2s-scenario-flow-wrap img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: initial;
    transform: none;
}

.content-wrapper.sidebar-compact-scope--project .p2s-overview-parallax-wrap {
    width: 100%;
    margin: 0;
    border-radius: 16px;
}

.content-wrapper.sidebar-compact-scope--project .p2s-overview-parallax-wrap img {
    width: 100%;
    height: 150%;
    object-fit: cover;
    object-position: center top;
    display: block;
    will-change: transform;
    transform: translateY(0);
}

.content-wrapper.sidebar-compact-scope--project .case-overview-hero-media {
    margin: 0;
    width: 100%;
}

.content-wrapper.sidebar-compact-scope--project .case-overview-hero-media img,
.content-wrapper.sidebar-compact-scope--project .case-overview-hero-media video {
    display: block;
    width: 100%;
    height: auto;
}

.content-wrapper.sidebar-compact-scope--project .case-overview-hero-media.lcm-overview-media {
    padding: 0;
    margin: 0;
    max-width: 100%;
}

.content-wrapper.sidebar-compact-scope--project .case-overview-hero-media.lt-overview-hero-video {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 8px;
}

.content-wrapper.sidebar-compact-scope--project .case-overview-hero-media.lt-overview-hero-video video {
    width: 100%;
    max-height: 620px;
    object-fit: contain;
    border-radius: 8px;
}

.content-wrapper.sidebar-compact-scope--project .p2s-parallax-wrap {
    width: 100%;
    margin: 0;
    border-radius: 16px;
}

/* --- Hero video variant --- */
.case-hero-img.case-hero-video { background: #0a0a0a; padding: 0; box-sizing: border-box; border: none !important; box-shadow: none !important; outline: none; }
.case-hero-video video.case-video-pending,
.case-section video.case-video-pending,
.lcm-overview-media video.case-video-pending,
.un-impact-hero-figure video.case-video-pending,
.un-intro-demo-video video.case-video-pending,
.un-intro-video-stage video.case-video-pending,
.p2s-overview-hero-video video.case-video-pending,
.p2s-overview-hero-stage video.case-video-pending {
    opacity: 0;
}
.case-hero-video video.case-video-ready,
.case-section video.case-video-ready,
.lcm-overview-media video.case-video-ready,
.un-impact-hero-figure video.case-video-ready,
.un-intro-demo-video video.case-video-ready,
.un-intro-video-stage video.case-video-ready,
.p2s-overview-hero-video video.case-video-ready,
.p2s-overview-hero-stage video.case-video-ready {
    opacity: 1;
    transition: opacity 0.2s ease;
}
.case-hero-img.case-hero-video video { display: block; object-position: center 20%; border: none !important; box-shadow: var(--video-shadow) !important; outline: none; border-radius: 8px; }

/* --- Parallax banner --- */
.p2s-parallax-wrap {
    width: 100%;
    height: 420px;
    overflow: hidden;
    position: relative;
}
.p2s-parallax-wrap img {
    width: 100%;
    height: 150%;
    object-fit: cover;
    object-position: center top;
    display: block;
    will-change: transform;
    transform: translateY(0);
}
@media (max-width: 900px) {
    .p2s-parallax-wrap { height: 260px; }
}
.case-content { padding: 40px 60px; max-width: 900px; margin: 0 auto; }
.case-content h2 { margin-top: 48px; margin-bottom: 16px; }
.case-content h2:first-child { margin-top: 0; }
.case-content h3 { margin-bottom: 12px; }
.case-content p { line-height: 1.8; margin-bottom: 16px; }
.case-content ul, .case-content ol { margin-left: 16px; margin-bottom: 16px; line-height: 1.65; }
.case-content ul li, .case-content ol li { margin-bottom: 2px; }
.case-content ul li::marker { color: var(--accent-color); font-size: 1.4em; }
.case-content ol li::marker { color: var(--accent-color); font-weight: 700; }

/* Case study sections with alternating backgrounds & dividers */
.case-section { padding: 56px 60px; max-width: 100%; border-bottom: 1px solid var(--border-color); }
.case-section-inner { max-width: 900px; margin: 0 auto; }
/* Subtitle + title header (small grey label above large bold title) */
.case-section-header { margin-bottom: 28px; }
.case-section-label,
.case-section .p2s-section-number,
.case-section .law-header > .law-label,
.case-section .law-2col-header .law-header > .law-label,
.case-section .uav-header > .uav-label,
.case-section .uav-2col-header .uav-header > .uav-label,
.case-section .qb-header-block > .qb-label,
.case-section .qb-2col-header > div:first-child > .qb-label,
.case-section .lt-header > .lt-label,
.case-section .lt-2col-header > div:first-child > .lt-label,
.case-section .mag-header > .mag-label,
.case-section .mag-2col-header > div:first-child > .mag-label,
.case-section .lcm-2col-header > div:first-child > .lcm-label,
.case-section .un-header > .un-label,
.case-section .un-2col-header .un-label,
.case-section .wn-2col-header > div:first-child > .wn-label,
.case-section .wn-header > .wn-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--text-color);
    margin-bottom: 8px;
    padding: 2px 0 2px 12px;
    border-left: 3px solid var(--accent-color);
    line-height: 1.4;
}
.case-section-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
}
.case-section-title {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
    color: var(--text-color);
}
.case-section h2 { margin-bottom: 20px; font-size: 1.6rem; }
.case-section h3 { margin-bottom: 12px; margin-top: 32px; }
.case-section .case-phase-block-header h3,
.case-section .case-phase-block-title {
    margin-top: 0;
    margin-bottom: 28px;
}
.case-section p { line-height: 1.8; margin-bottom: 16px; }
.case-section ul, .case-section ol { margin-left: 16px; margin-bottom: 16px; line-height: 1.65; }
.case-section ul li { margin-bottom: 2px; }
.case-section ol li { margin-bottom: 2px; }
.case-section ul li::marker { color: var(--accent-color); font-size: 1.4em; }
.case-section ol li::marker { color: var(--accent-color); font-weight: 700; }
.case-highlight-list li::marker { color: var(--accent-color); }

/* Design process — result headline + supporting copy (all case studies) */
.case-phase-result-head {
    margin: 0 0 14px;
    padding: 0 0 0 14px;
    border-left: 3px solid var(--accent-blue);
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--text-color);
}
.case-phase-result-head strong {
    color: var(--accent-blue);
    font-weight: 700;
}
.case-phase-body {
    font-size: 0.84rem;
    line-height: 1.75;
    color: var(--secondary-text);
    margin: 0 0 12px;
}
.case-phase-emphasis {
    margin: 12px 0 14px;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.55;
    color: var(--accent-blue);
}
.case-section .case-phase-body strong {
    color: var(--text-color);
    font-weight: 700;
}

/* Design process — bordered phase blocks (Pic2Split-style, all case studies) */
.case-phase-pairs,
.p2s-phase-pairs {
    display: flex;
    flex-direction: column;
    gap: 32px;
}
.case-phase-block,
.p2s-phase-block {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-color);
    overflow: hidden;
}
.case-phase-block-header,
.p2s-phase-block-header {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 22px 28px 20px;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(180deg, rgba(var(--brand-rgb), 0.1) 0%, rgba(var(--brand-rgb), 0.02) 100%);
}
[data-theme="dark"] .case-phase-block-header,
[data-theme="dark"] .p2s-phase-block-header {
    background: linear-gradient(180deg, rgba(var(--brand-rgb), 0.18) 0%, rgba(var(--brand-rgb), 0.05) 100%);
}
.case-phase-kicker,
.p2s-phase-block-header .p2s-phase-num {
    display: block;
    margin: 0;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent-color);
}

/* Design process phase headers — per-project color schemes */
.un-section .case-phase-block-header {
    background: linear-gradient(165deg, rgba(0, 88, 154, 0.14) 0%, rgba(0, 119, 200, 0.06) 100%);
    border-bottom-color: rgba(0, 88, 154, 0.18);
}
[data-theme="dark"] .un-section .case-phase-block-header {
    background: linear-gradient(165deg, rgba(0, 119, 200, 0.22) 0%, rgba(0, 88, 154, 0.1) 100%);
    border-bottom-color: rgba(0, 119, 200, 0.24);
}
.un-section .case-phase-kicker { color: #0077C8; }
[data-theme="dark"] .un-section .case-phase-kicker { color: #5eb3e8; }

.lcm-section .case-phase-block-header {
    background: linear-gradient(165deg, rgba(var(--brand-rgb), 0.12) 0%, rgba(210, 168, 120, 0.1) 48%, rgba(139, 90, 43, 0.08) 100%);
    border-bottom-color: rgba(139, 90, 43, 0.15);
}
[data-theme="dark"] .lcm-section .case-phase-block-header {
    background: linear-gradient(165deg, rgba(var(--brand-rgb), 0.1) 0%, rgba(139, 90, 43, 0.12) 48%, rgba(var(--brand-rgb), 0.06) 100%);
    border-bottom-color: rgba(210, 168, 120, 0.2);
}
.lcm-section .case-phase-kicker { color: #8B5A2B; }
[data-theme="dark"] .lcm-section .case-phase-kicker { color: #d4a574; }

.p2s-phase-pairs .case-phase-block-header,
.p2s-phase-pairs .p2s-phase-block-header {
    background: linear-gradient(165deg, rgba(var(--brand-rgb), 0.1) 0%, rgba(74, 85, 224, 0.1) 52%, rgba(232, 226, 88, 0.08) 100%);
    border-bottom-color: var(--accent-blue-border);
}
[data-theme="dark"] .p2s-phase-pairs .case-phase-block-header,
[data-theme="dark"] .p2s-phase-pairs .p2s-phase-block-header {
    background: linear-gradient(165deg, rgba(var(--brand-rgb), 0.14) 0%, rgba(74, 85, 224, 0.16) 52%, rgba(232, 226, 88, 0.1) 100%);
}
.p2s-phase-pairs .case-phase-kicker,
.p2s-phase-pairs .p2s-phase-block-header .p2s-phase-num { color: var(--accent-blue); }

.qb-section .case-phase-block-header {
    background: linear-gradient(180deg, var(--accent-yellow-soft) 0%, rgba(var(--brand-rgb), 0.06) 100%);
    border-bottom-color: var(--accent-yellow-border);
}
[data-theme="dark"] .qb-section .case-phase-block-header {
    background: linear-gradient(180deg, rgba(232, 226, 88, 0.2) 0%, rgba(var(--brand-rgb), 0.08) 100%);
}
.qb-section .case-phase-kicker { color: #9d8f00; }
[data-theme="dark"] .qb-section .case-phase-kicker { color: var(--accent-yellow); }

.law-section .case-phase-block-header {
    background: linear-gradient(180deg, rgba(140, 29, 64, 0.12) 0%, rgba(255, 198, 39, 0.1) 100%);
    border-bottom-color: rgba(140, 29, 64, 0.2);
}
[data-theme="dark"] .law-section .case-phase-block-header {
    background: linear-gradient(180deg, rgba(140, 29, 64, 0.22) 0%, rgba(255, 198, 39, 0.12) 100%);
    border-bottom-color: rgba(255, 198, 39, 0.2);
}
.law-section .case-phase-kicker { color: #8C1D40; }
[data-theme="dark"] .law-section .case-phase-kicker { color: #e8a0b8; }

.mag-section .case-phase-block-header {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.05) 0%, rgba(var(--brand-rgb), 0.08) 100%);
    border-bottom-color: rgba(0, 0, 0, 0.1);
}
[data-theme="dark"] .mag-section .case-phase-block-header {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, rgba(var(--brand-rgb), 0.1) 100%);
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.uav-section .case-phase-block-header {
    background: linear-gradient(180deg, rgba(var(--brand-rgb), 0.12) 0%, rgba(74, 85, 224, 0.06) 100%);
    border-bottom-color: rgba(var(--brand-rgb), 0.18);
}
[data-theme="dark"] .uav-section .case-phase-block-header {
    background: linear-gradient(180deg, rgba(var(--brand-rgb), 0.16) 0%, rgba(74, 85, 224, 0.1) 100%);
}
.uav-section .case-phase-kicker { color: var(--accent-color); }
[data-theme="dark"] .uav-section .case-phase-kicker { color: #6ee7a0; }

.lt-section .case-phase-block-header {
    background: linear-gradient(165deg, rgba(var(--brand-rgb), 0.12) 0%, rgba(138, 106, 63, 0.08) 100%);
    border-bottom-color: rgba(138, 106, 63, 0.15);
}
[data-theme="dark"] .lt-section .case-phase-block-header {
    background: linear-gradient(165deg, rgba(var(--brand-rgb), 0.14) 0%, rgba(138, 106, 63, 0.12) 100%);
}
.lt-section .case-phase-kicker { color: #5a8f42; }
[data-theme="dark"] .lt-section .case-phase-kicker { color: #8fd46a; }

.dm-section .case-phase-block-header {
    background: linear-gradient(180deg, rgba(52, 152, 219, 0.12) 0%, rgba(var(--brand-rgb), 0.08) 100%);
    border-bottom-color: rgba(52, 152, 219, 0.18);
}
[data-theme="dark"] .dm-section .case-phase-block-header {
    background: linear-gradient(180deg, rgba(52, 152, 219, 0.18) 0%, rgba(var(--brand-rgb), 0.1) 100%);
}
.dm-section .case-phase-kicker { color: #2878b8; }
[data-theme="dark"] .dm-section .case-phase-kicker { color: #6eb8e8; }
.case-phase-block-title,
.p2s-phase-block-title {
    margin: 0;
    font-size: 1.32rem;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.02em;
    color: var(--text-color);
}
.case-phase-block-inner,
.p2s-phase-block-inner,
.case-phase-split,
.law-split,
.mag-split,
.wn-split,
.lt-process-split,
.lcm-phase-split,
.qb-phase-split,
.uav-phase-split {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 28px;
    padding: 40px 28px 44px;
    align-items: stretch;
    margin: 0;
}
.case-phase-pairs .case-phase-block-inner--media-col-4,
.case-phase-pairs .p2s-phase-block-inner--media-col-4 {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
}
.case-phase-block-copy .case-research-chart--compact {
    border: none;
    border-radius: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
}
.case-phase-block-copy .case-research-chart--compact .case-chart-title,
.case-phase-block-copy .case-research-chart--compact .case-chart-stats,
.case-phase-block-copy .case-research-chart--compact .case-chart-source {
    display: none;
}
.case-phase-block-copy .case-research-chart--compact .case-chart-desc {
    display: block;
    margin-bottom: 10px;
}
.case-phase-block-copy .case-research-chart--compact .case-chart-bars {
    gap: 10px;
    margin-bottom: 0;
    padding-bottom: 16px;
}
.case-phase-block-inner > *,
.p2s-phase-block-inner > *,
.case-phase-split > *,
.law-split > *,
.mag-split > *,
.wn-split > *,
.lt-process-split > *,
.lcm-phase-split > *,
.qb-phase-split > *,
.uav-phase-split > * {
    min-width: 0;
}
.case-phase-block-copy,
.p2s-phase-block-copy,
.case-phase-split-copy,
.law-split-copy,
.mag-split-copy,
.wn-split-copy,
.lt-process-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
    min-height: 100%;
    align-self: stretch;
}
.case-phase-block-copy p,
.p2s-phase-block-copy p {
    margin: 0 0 12px;
}
.case-phase-block-copy > *:last-child,
.p2s-phase-block-copy > *:last-child,
.case-phase-split-copy > *:last-child,
.law-split-copy > *:last-child,
.mag-split-copy > *:last-child,
.wn-split-copy > *:last-child,
.lt-process-copy > *:last-child {
    margin-bottom: 0;
}
.case-phase-block-media,
.p2s-phase-block-media,
.case-phase-split-media {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 16px;
}
.case-phase-block-media .wn-figure-grid,
.case-phase-split-media .wn-figure-grid,
.case-phase-block-media .case-fig-grid-2,
.case-phase-split-media .case-fig-grid-2 {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.case-phase-block-media .un-persona-grid,
.case-phase-split-media .un-persona-grid {
    grid-template-columns: 1fr;
}
.case-phase-block-media .un-persona-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    align-items: start;
    width: 100%;
}
.case-phase-block-media .un-persona-row .case-figure {
    margin: 0;
}
.case-phase-block-media .un-persona-row img {
    width: 100%;
    height: auto;
    display: block;
}
.case-phase-block-inner--solo {
    grid-template-columns: 1fr;
    padding-top: 40px;
    padding-bottom: 44px;
}
.case-phase-block-media .case-figure,
.p2s-phase-block-media .case-figure,
.case-phase-split-media .case-figure {
    margin: 0;
}
.case-phase-split--reverse {
    direction: rtl;
}
.case-phase-split--reverse > * {
    direction: ltr;
}

/* Design process copy column — card groups stack vertically */
.case-phase-block-copy .law-component-grid,
.case-phase-block-copy .lt-pillar-grid,
.case-phase-block-copy .uav-principle-grid,
.case-phase-block-copy .un-insight-grid,
.case-phase-block-copy .un-findings {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.case-phase-block-copy .law-component-card,
.case-phase-block-copy .lt-pillar-card,
.case-phase-block-copy .uav-principle-card,
.case-phase-block-copy .uav-dashboard-card,
.case-phase-block-copy .un-insight-card,
.case-phase-block-copy .law-demo-block,
.case-phase-block-copy .qb-pivot,
.case-phase-block-copy .lcm-pivot,
.case-phase-block-copy .lt-callout {
    width: 100%;
    box-sizing: border-box;
}
.case-phase-block-copy .law-nav-row,
.case-phase-block-copy .mag-nav-row,
.case-phase-block-copy .wn-color-swatches,
.case-phase-block-copy .wn-tool-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}
.case-phase-block-copy .law-nav-chip,
.case-phase-block-copy .mag-nav-chip,
.case-phase-block-copy .wn-tool-chip {
    width: fit-content;
    max-width: 100%;
}
.case-phase-block-copy .un-callout-row {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}
.case-phase-block-copy .un-callout-cell {
    border-right: none;
    border-bottom: 1px solid var(--border-color);
}
.case-phase-block-copy .un-callout-cell:last-child {
    border-bottom: none;
}

/* Phase pairs + research chart — chart nested in copy; image on right */
.case-phase-pairs .case-phase-block-inner--with-chart,
.case-phase-pairs .p2s-phase-block-inner--with-chart {
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    grid-template-rows: auto;
    grid-template-areas: "copy media";
    gap: 18px 28px;
    align-items: center;
}
.case-phase-pairs .case-phase-block-inner--with-chart.case-phase-block-inner--media-col-4,
.case-phase-pairs .p2s-phase-block-inner--with-chart.p2s-phase-block-inner--media-col-4 {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
}
.case-phase-pairs .case-phase-block-inner--with-chart .case-phase-block-copy,
.case-phase-pairs .p2s-phase-block-inner--with-chart .p2s-phase-block-copy {
    grid-area: copy;
    justify-content: center;
}
.case-phase-pairs .case-phase-block-inner--with-chart .case-phase-block-copy .case-research-chart,
.case-phase-pairs .p2s-phase-block-inner--with-chart .p2s-phase-block-copy .p2s-research-chart {
    margin-top: 10px;
}
.case-phase-pairs .case-phase-block-inner--with-chart .case-phase-block-copy .case-chart-bars,
.case-phase-pairs .p2s-phase-block-inner--with-chart .p2s-phase-block-copy .p2s-chart-bars {
    gap: 8px;
    margin-bottom: 0;
    padding-bottom: 16px;
}
.case-phase-pairs .case-phase-block-inner--with-chart .case-phase-block-media,
.case-phase-pairs .p2s-phase-block-inner--with-chart .p2s-phase-block-media {
    grid-area: media;
    align-self: center;
}
.case-phase-pairs .case-chart-source {
    display: none;
}

@media (max-width: 900px) {
    .case-phase-block-inner,
    .p2s-phase-block-inner,
    .case-phase-split,
    .case-phase-split--reverse,
    .law-split,
    .mag-split,
    .wn-split,
    .lt-process-split,
    .lcm-phase-split,
    .qb-phase-split,
    .uav-phase-split {
        grid-template-columns: 1fr;
        direction: ltr;
    }
    .case-phase-block-media .un-persona-row {
        grid-template-columns: 1fr;
    }
    .case-phase-pairs .case-phase-block-inner--with-chart,
    .case-phase-pairs .p2s-phase-block-inner--with-chart {
        grid-template-columns: 1fr;
        grid-template-areas:
            "copy"
            "media";
    }
    .case-phase-block-copy,
    .p2s-phase-block-copy,
    .case-phase-split-copy,
    .law-split-copy,
    .mag-split-copy,
    .wn-split-copy,
    .lt-process-copy {
        min-height: auto;
        justify-content: flex-start;
    }
}


/* UAV case study extras */
.uav-hero {
    position: relative;
    height: min(58vh, 520px);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: #111;
}
.uav-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--uav-hero-img);
    background-size: cover;
    background-position: center;
    transform: scale(1.04);
    will-change: transform;
}
.uav-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.18) 45%, rgba(0,0,0,0.65) 100%);
}
@media (min-width: 900px) {
    .uav-hero::before { background-attachment: fixed; }
}
.uav-hero-content {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 28px 28px 26px;
    color: #fff;
}
.uav-hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    opacity: 0.95;
}
.uav-hero-title {
    font-size: clamp(2rem, 5vw, 3.2rem);
    line-height: 1.05;
    font-weight: 700;
    margin-top: 10px;
    margin-bottom: 8px;
}
.uav-hero-sub {
    max-width: 680px;
    font-size: 1rem;
    line-height: 1.6;
    opacity: 0.92;
    margin: 0;
}
.uav-stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255,255,255,0.14);
    border: 1px solid rgba(255,255,255,0.22);
    width: fit-content;
    margin-bottom: 14px;
    backdrop-filter: blur(6px);
}

.case-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-color);
}
.case-table th,
.case-table td {
    padding: 14px 14px;
    vertical-align: top;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
    line-height: 1.55;
}
.case-table th {
    text-align: left;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--secondary-text);
    background: rgba(var(--brand-rgb), 0.06);
}
.case-table tr:last-child td { border-bottom: 0; }

.callout-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: rgba(var(--brand-rgb), 0.06);
    color: var(--text-color);
    font-size: 0.8rem;
    font-weight: 700;
}
.callout-badge i { color: var(--accent-color); }

/* Problem sections: muted label, red accent bar + title */
.case-section--problem .case-section-label,
.case-section--problem .p2s-section-number,
.case-section--problem .law-header > .law-label,
.case-section--problem .law-2col-header .law-header > .law-label,
.case-section--problem .uav-header > .uav-label,
.case-section--problem .uav-2col-header .uav-header > .uav-label,
.case-section--problem .qb-header-block > .qb-label,
.case-section--problem .qb-2col-header > div:first-child > .qb-label,
.case-section--problem .lt-header > .lt-label,
.case-section--problem .lt-2col-header > div:first-child > .lt-label,
.case-section--problem .mag-header > .mag-label,
.case-section--problem .mag-2col-header > div:first-child > .mag-label,
.case-section--problem .lcm-2col-header > div:first-child > .lcm-label,
.case-section--problem .un-header > .un-label,
.case-section--problem .un-2col-header .un-label,
.case-section--problem .wn-2col-header > div:first-child > .wn-label,
.case-section--problem .wn-header > .wn-label {
    color: var(--text-color);
    border-left-color: var(--accent-color);
}
.case-section--problem .case-section-title,
.case-section--problem .qb-title,
.case-section--problem .lcm-title,
.case-section--problem .p2s-section-title-main {
    color: var(--problem-color);
}

/* Problem / issue emphasis on case study pages */
.case-problem-icon,
.case-section--problem .p2s-phase-icon,
.case-section--problem .callout-badge,
.case-problem-card .callout-badge,
.case-problem-card .case-problem-icon-wrap {
    color: var(--problem-color);
    background: var(--problem-bg);
    border-color: var(--problem-border);
}
.case-problem-icon i,
.case-section--problem .p2s-phase-icon i,
.case-problem-card .callout-badge i,
.case-problem-card .case-problem-icon-wrap i,
.case-problem-icon-wrap i {
    color: var(--problem-color);
}
.case-problem-icon-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--problem-bg);
    border: 1px solid var(--problem-border);
}
.case-problem-card {
    background: var(--problem-bg) !important;
    border-color: var(--problem-border) !important;
}
.qb-finding-item,
.lcm-finding-item,
.p2s-finding-item {
    transition: background 0.15s ease;
}
.qb-finding-item:hover,
.lcm-finding-item:hover,
.p2s-finding-item:hover,
.case-problem-card:hover:not(.un-problem-card),
.p2s-issue-card:hover {
    background: var(--problem-bg-strong) !important;
}
.case-section--problem .case-highlight-list li::marker {
    color: var(--problem-color);
}
.case-section-alt { background: var(--bg-color); }
[data-theme="light"] .case-section-alt { background: #f8f9fa; }
[data-theme="dark"] .case-section-alt { background: #1a1a1a; }

/* Cards on gray alt sections stay white (readable on every case study page) */
[data-theme="light"] .case-section-alt .case-card,
[data-theme="light"] .case-section-alt [class*="goal-card"],
[data-theme="light"] .case-section-alt [class*="insight-card"],
[data-theme="light"] .case-section-alt [class*="solution-card"],
[data-theme="light"] .case-section-alt [class*="persona-card"],
[data-theme="light"] .case-section-alt [class*="view-card"],
[data-theme="light"] .case-section-alt [class*="mockup-cell"],
[data-theme="light"] .case-section-alt [class*="impact-cell"],
[data-theme="light"] .case-section-alt [class*="phase-card"],
[data-theme="light"] .case-section-alt [class*="step-cell"],
[data-theme="light"] .case-section-alt [class*="outcome-cell"],
[data-theme="light"] .case-section-alt [class*="p2s-card"],
[data-theme="light"] .case-section-alt [class*="lcm-card"],
[data-theme="light"] .case-section-alt [class*="qb-card"],
[data-theme="light"] .case-section-alt .un-findings,
[data-theme="light"] .case-section-alt [class*="callout-cell"],
[data-theme="light"] .case-section-alt [class*="callout-row"] > *,
[data-theme="light"] .case-section-alt [class*="demo-frame"] {
    background: #ffffff;
}
[data-theme="dark"] .case-section-alt .case-card,
[data-theme="dark"] .case-section-alt [class*="goal-card"],
[data-theme="dark"] .case-section-alt [class*="insight-card"],
[data-theme="dark"] .case-section-alt [class*="solution-card"],
[data-theme="dark"] .case-section-alt [class*="persona-card"],
[data-theme="dark"] .case-section-alt [class*="view-card"],
[data-theme="dark"] .case-section-alt [class*="mockup-cell"],
[data-theme="dark"] .case-section-alt [class*="impact-cell"],
[data-theme="dark"] .case-section-alt [class*="phase-card"],
[data-theme="dark"] .case-section-alt [class*="step-cell"],
[data-theme="dark"] .case-section-alt [class*="outcome-cell"],
[data-theme="dark"] .case-section-alt [class*="p2s-card"],
[data-theme="dark"] .case-section-alt [class*="lcm-card"],
[data-theme="dark"] .case-section-alt [class*="qb-card"],
[data-theme="dark"] .case-section-alt .un-findings,
[data-theme="dark"] .case-section-alt [class*="callout-cell"],
[data-theme="dark"] .case-section-alt [class*="demo-frame"] {
    background: var(--bg-color);
}

/* Case study figures + captions (pic2split pattern — all project pages) */
.case-fig-grid-2,
.case-section .p2s-grid-2,
.case-section .lcm-grid-2,
.case-section .un-grid-2,
.case-section .un-research-figures,
.case-section .qb-grid-2,
.case-section .case-section-grid-2col {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
    gap: 20px;
    align-items: start;
}
.case-fig-grid-2 > *,
.case-section .p2s-grid-2 > *,
.case-section .lcm-grid-2 > *,
.case-section .un-grid-2 > *,
.case-section .un-research-figures > *,
.case-section .qb-grid-2 > *,
.case-section .case-section-grid-2col > * {
    min-width: 0;
}
.case-fig-grid-3,
.case-section .p2s-grid-3,
.case-section .un-view-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    align-items: start;
}
.case-section .case-figure,
.case-section .p2s-figure,
.case-section .lcm-figure,
.case-section .un-figure,
.case-section .qb-figure,
.case-section figure:has(> img):not(.about-carousel-item figure) {
    margin: 0;
    overflow: visible;
    border: 0;
    background: transparent;
}
.case-section .case-figure img,
.case-section .p2s-figure img,
.case-section .lcm-figure img,
.case-section .un-figure img,
.case-section .qb-figure img,
.case-section figure:has(> img) img {
    width: 100%;
    height: auto;
    display: block;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-color);
}
.case-section .case-figure video,
.case-section .p2s-figure video {
    width: 100%;
    height: auto;
    display: block;
    border: none;
    border-radius: 8px;
    background: transparent;
    box-shadow: var(--video-shadow);
}

video {
    border: none !important;
    border-radius: 8px;
    box-shadow: var(--video-shadow) !important;
    outline: none;
}

[data-theme="dark"] video {
    box-shadow: var(--video-shadow-dark) !important;
}

/* Video containers — no border */
.p2s-overview-hero-stage,
.p2s-solution-row--phone-stage .p2s-phone-stage,
.lcm-video-stage-inner,
.lcm-overview-media,
.un-intro-video-stage,
.un-video-stage-inner,
.un-video-device-wrap,
.uav-demo-video-wrap,
.lt-overview-hero-video,
.lt-phone-frame:has(> video),
.case-section .p2s-phone-frame--device:has(> video),
.case-section .p2s-grid-2 .p2s-phone-frame:not(.p2s-phone-frame--device):has(> video),
.p2s-phone-frame:has(> video),
.image-container.image-container--video {
    border: none !important;
    box-shadow: none !important;
    outline: none;
}

.content-wrapper.sidebar-compact-scope--project .case-hero-img.case-hero-video {
    border-radius: 8px;
    overflow: hidden;
}
.case-section .case-figure-readable img,
.case-section .p2s-figure-readable img,
.case-section .lcm-figure-readable img,
.case-section .un-figure-readable img,
.case-section .qb-figure-readable img {
    object-fit: contain;
}
.case-figure-zoomable {
    cursor: zoom-in;
}
.case-figure-zoomable:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 3px;
}

/* Case figure zoom lightbox */
.case-figure-zoom {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    pointer-events: none;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}
.case-figure-zoom.is-open {
    pointer-events: auto;
    visibility: visible;
    opacity: 1;
}
.case-figure-zoom-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.82);
    cursor: zoom-out;
}
.case-figure-zoom-dialog {
    position: relative;
    z-index: 1;
    width: min(96vw, 1200px);
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
}
.case-figure-zoom-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}
.case-figure-zoom-title {
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.4;
    color: var(--secondary-text);
    flex: 1;
    min-width: 0;
}
.case-figure-zoom-controls {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.case-figure-zoom-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-color);
    color: var(--text-color);
    cursor: pointer;
    font-size: 0.85rem;
    transition: border-color 0.15s ease, color 0.15s ease;
}
.case-figure-zoom-btn:hover,
.case-figure-zoom-btn:focus-visible {
    border-color: var(--accent-color);
    color: var(--accent-color);
    outline: none;
}
.case-figure-zoom-level {
    min-width: 44px;
    text-align: center;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-color);
}
.case-figure-zoom-stage {
    overflow: auto;
    flex: 1;
    min-height: 200px;
    max-height: calc(92vh - 56px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: var(--bg-color);
    -webkit-overflow-scrolling: touch;
}
.case-figure-zoom-img {
    max-width: 100%;
    width: auto;
    height: auto;
    display: block;
    transform-origin: center center;
    transition: transform 0.15s ease;
    border-radius: 4px;
}
body.case-figure-zoom-open {
    overflow: hidden;
}
body.case-figure-zoom-open #scroll-container {
    overflow: hidden !important;
}
.case-section .lcm-figure-white img,
.case-section .un-figure-white img,
.case-section .qb-figure-white img {
    background: #fff;
    padding: 16px;
    box-sizing: border-box;
}
[data-theme="dark"] .case-section .lcm-figure-white img,
[data-theme="dark"] .case-section .un-figure-white img,
[data-theme="dark"] .case-section .qb-figure-white img {
    background: var(--bg-color);
}
.case-section .case-caption,
.case-section .p2s-caption,
.case-section .lcm-caption,
.case-section .un-caption,
.case-section .qb-caption,
.case-section figure figcaption {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 2px 0;
    margin: 0;
    font-size: 0.82rem;
    color: var(--secondary-text);
    background: transparent;
    line-height: 1.65;
    font-style: normal;
    font-weight: 400;
}
.case-section .case-caption::before,
.case-section .p2s-caption::before,
.case-section .lcm-caption::before,
.case-section .un-caption::before,
.case-section .qb-caption::before,
.case-section figure figcaption::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--accent-color);
    flex: 0 0 8px;
    margin-top: 0.42rem;
}
.case-section .case-fig-grid-2 .un-demo-frame,
.case-section .p2s-grid-2 .p2s-phone-frame:not(.p2s-phone-frame--device) {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-color);
    padding: 0;
}
.case-section .p2s-grid-2 .p2s-phone-frame:not(.p2s-phone-frame--device):has(> video) {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
}
.case-section .case-fig-grid-2 .un-demo-frame img,
.case-section .p2s-grid-2 .p2s-phone-frame:not(.p2s-phone-frame--device) img,
.case-section .p2s-grid-2 .p2s-phone-frame:not(.p2s-phone-frame--device) video {
    border: none;
    border-radius: 8px;
    padding: 0;
    width: 100%;
    display: block;
    vertical-align: top;
}
.case-section .p2s-grid-2:not(.p2s-solution-row--phone-stage) .p2s-phone-frame--device {
    position: relative;
    isolation: isolate;
    width: min(320px, 100%);
    max-width: 320px;
    margin-inline: auto;
    aspect-ratio: 9 / 19.5;
    height: auto;
    border: 3px solid #ffffff;
    border-radius: 8px;
    overflow: hidden;
    background: linear-gradient(
        155deg,
        #ffffff 0%,
        #f7f7f7 22%,
        #ececec 50%,
        #f4f4f4 78%,
        #ffffff 100%
    );
    padding: 6px;
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.08),
        0 14px 36px rgba(0, 0, 0, 0.14),
        0 28px 56px rgba(0, 0, 0, 0.08),
        inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}
.case-section .p2s-grid-2:not(.p2s-solution-row--phone-stage) .p2s-phone-frame--device:has(> video):not(:has(> img)) {
    border: 1px solid #e0e0e0 !important;
    box-shadow: none !important;
    background: transparent !important;
    padding: 0 !important;
    overflow: hidden !important;
    border-radius: 8px;
}
.case-section .p2s-grid-2 .p2s-phone-frame--device::before {
    content: "";
    position: absolute;
    inset: 4px;
    border-radius: 6px;
    pointer-events: none;
    z-index: 2;
    background: linear-gradient(
        148deg,
        rgba(255, 255, 255, 0.34) 0%,
        rgba(255, 255, 255, 0.1) 14%,
        rgba(255, 255, 255, 0.03) 28%,
        transparent 46%
    );
    box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.08);
}
.case-section .p2s-grid-2.p2s-solution-row--phone-stage .p2s-phone-frame--device::before {
    display: none;
}
.case-section .p2s-grid-2:not(.p2s-solution-row--phone-stage) .p2s-phone-frame--device::before {
    display: none;
}
.case-section .p2s-grid-2.p2s-solution-row--phone-stage .p2s-phone-frame--device {
    border: none;
    background: linear-gradient(
        155deg,
        #5a5a5a 0%,
        #2a2a2a 16%,
        #101010 48%,
        #1c1c1c 72%,
        #454545 100%
    );
    padding: 5px;
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.14),
        0 14px 36px rgba(0, 0, 0, 0.24),
        0 28px 56px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.42),
        inset 1px 0 0 rgba(255, 255, 255, 0.14),
        inset 0 -1.5px 0 rgba(0, 0, 0, 0.55),
        inset -1px 0 0 rgba(0, 0, 0, 0.28),
        inset 0 0 0 1px rgba(0, 0, 0, 0.65);
}
.case-section .p2s-grid-2:not(.p2s-solution-row--phone-stage) .p2s-phone-frame--device:has(> video):not(:has(> img))::after {
    display: none;
}
.case-section .p2s-grid-2 .p2s-phone-frame--device::after {
    content: "";
    position: absolute;
    left: 8%;
    right: 8%;
    bottom: -14px;
    height: 20px;
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
    background: radial-gradient(
        ellipse at center,
        rgba(0, 0, 0, 0.26) 0%,
        rgba(0, 0, 0, 0.08) 48%,
        transparent 72%
    );
    filter: blur(3px);
}
.case-section .p2s-grid-2:not(.p2s-solution-row--phone-stage) .p2s-phone-frame--device img {
    position: relative;
    z-index: 1;
    border: 2px solid #ffffff;
    border-radius: 8px;
    width: 100%;
    box-shadow:
        inset 0 0 0 1px rgba(0, 0, 0, 0.08),
        0 0 0 1px rgba(0, 0, 0, 0.04);
}
.case-section .p2s-grid-2:not(.p2s-solution-row--phone-stage) .p2s-phone-frame--device video {
    position: relative;
    z-index: 1;
    border: none !important;
    border-radius: 8px;
    width: 100%;
    box-shadow: none !important;
}
[data-theme="dark"] .case-section .p2s-grid-2:not(.p2s-solution-row--phone-stage) .p2s-phone-frame--device video {
    box-shadow: none !important;
}
[data-theme="dark"] .case-section .p2s-grid-2:not(.p2s-solution-row--phone-stage) .p2s-phone-frame--device:has(> video):not(:has(> img)) {
    border-color: #e0e0e0 !important;
}
.case-section .p2s-grid-2:not(.p2s-solution-row--phone-stage) .p2s-phone-frame--device img {
    height: 100%;
    object-fit: cover;
}
.case-section .p2s-grid-2:not(.p2s-solution-row--phone-stage) .p2s-phone-frame--device video {
    height: auto;
    object-fit: contain;
}
.case-section .p2s-grid-2.p2s-solution-row--phone-stage .p2s-phone-frame--device {
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: auto;
    align-self: stretch;
    max-width: min(36%, 300px);
    aspect-ratio: unset;
}
.case-section .p2s-grid-2.p2s-solution-row--phone-stage .p2s-phone-frame--device img,
.case-section .p2s-grid-2.p2s-solution-row--phone-stage .p2s-phone-frame--device video {
    display: block;
    width: auto;
    height: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    border: none;
    box-shadow: none;
}
.case-section .p2s-grid-2.p2s-solution-row--phone-stage .p2s-phone-frame--device:has(> video):not(:has(> img)),
.p2s-solution-row--phone-stage .p2s-phone-frame--device:has(> video):not(:has(> img)),
.p2s-solution-row--phone-stage .p2s-phone-frame--device:has(> img):not(:has(> video)),
.p2s-overview-hero-stage .p2s-phone-frame--device:has(> video) {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    padding: 0 !important;
}
.p2s-solution-row--phone-stage .p2s-phone-frame--device::after {
    display: none;
}
.p2s-solution-row--phone-stage .p2s-phone-frame--device::before {
    display: none;
}
.p2s-solution-row--phone-stage .p2s-phone-frame--device img,
.p2s-solution-row--phone-stage .p2s-phone-frame--device video {
    width: auto;
    height: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    border: none;
    box-shadow: none;
}
[data-theme="dark"] .case-section .p2s-grid-2:not(.p2s-solution-row--phone-stage) .p2s-phone-frame--device {
    border-color: rgba(255, 255, 255, 0.92);
    background: linear-gradient(
        155deg,
        #f0f0f0 0%,
        #e4e4e4 22%,
        #d8d8d8 50%,
        #ececec 78%,
        #f5f5f5 100%
    );
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.2),
        0 14px 36px rgba(0, 0, 0, 0.28),
        0 28px 56px rgba(0, 0, 0, 0.14),
        inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}
[data-theme="dark"] .case-section .p2s-grid-2.p2s-solution-row--phone-stage .p2s-phone-frame--device {
    border: none;
    background: linear-gradient(
        155deg,
        #6a6a6a 0%,
        #333333 16%,
        #181818 48%,
        #242424 72%,
        #505050 100%
    );
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.28),
        0 14px 36px rgba(0, 0, 0, 0.42),
        0 28px 56px rgba(0, 0, 0, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.28),
        inset 1px 0 0 rgba(255, 255, 255, 0.1),
        inset 0 -1.5px 0 rgba(0, 0, 0, 0.65),
        inset -1px 0 0 rgba(0, 0, 0, 0.35),
        inset 0 0 0 1px rgba(0, 0, 0, 0.75);
}
[data-theme="dark"] .case-section .p2s-grid-2 .p2s-phone-frame--device::before {
    background: linear-gradient(
        148deg,
        rgba(255, 255, 255, 0.22) 0%,
        rgba(255, 255, 255, 0.07) 14%,
        rgba(255, 255, 255, 0.02) 28%,
        transparent 46%
    );
}
[data-theme="dark"] .p2s-solution-row--phone-stage .p2s-phone-stage.col-12,
[data-theme="dark"] .p2s-overview-hero-stage {
    background: linear-gradient(
        165deg,
        rgba(74, 85, 224, 0.18) 0%,
        rgba(74, 85, 224, 0.1) 52%,
        rgba(232, 226, 88, 0.06) 100%
    );
}

@media (max-width: 1200px) {
    .case-section { padding: 36px 20px; }
    .case-fig-grid-2,
    .case-section .p2s-grid-2,
    .case-section .lcm-grid-2,
    .case-section .un-grid-2,
    .case-section .un-research-figures,
    .case-section .qb-grid-2,
    .case-section .case-section-grid-2col,
    .case-fig-grid-3,
    .case-section .p2s-grid-3,
    .case-section .un-view-grid {
        grid-template-columns: 1fr !important;
    }
    .case-section-grid-2col { grid-template-columns: 1fr !important; }
    .case-section-mobile-row { grid-template-columns: 1fr !important; }
    .case-section-cols-4 { grid-template-columns: repeat(2, 1fr) !important; }
    .case-section-cols-3 { grid-template-columns: 1fr !important; }
}
@media (max-width: 600px) {
    .case-section-cols-4 { grid-template-columns: 1fr !important; }

    /* Sidebar */
    .hero-text h1 { font-size: clamp(1.65rem, 9cqi, 2.2rem); }
    .sidebar-intro { font-size: 0.82rem; }

    /* Works header / filter bar */
    .section-title { font-size: 0.82rem; }
    .filter-btn { font-size: 0.68rem; padding: 5px 11px; }

    /* Projects CTA */
    .projects-cta-title { font-size: 1.15rem; }
    .projects-cta-body { font-size: 0.8rem; }
    .projects-cta-btn { font-size: 0.68rem; padding: 7px 14px; }
}

/* Touch / stacked layout: same breakpoint as mobile shell (1200px), not 900px — was missing gradient on next projects between 901–1200px */
@media (max-width: 1200px) {
    .image-container::before,
    .next-project-img::before,
    .project-overlay {
        opacity: 1;
    }

    /* Lighter gradient above; bottom stop unchanged for text legibility */
    .image-container::before,
    .next-project-img::before {
        background: linear-gradient(
            180deg,
            rgba(0, 0, 0, 0) 0%,
            rgba(0, 0, 0, 0.12) 32%,
            rgba(0, 0, 0, 0.55) 74%,
            rgba(0, 0, 0, 0.96) 100%
        );
    }

    .project-overlay {
        transform: translateY(0);
        padding: 12px;
        gap: 6px;
    }

    .project-overlay-title {
        font-size: 1rem;
        line-height: 1.15;
    }

    .project-overlay-subtitle {
        font-size: 0.72rem;
        line-height: 1.3;
    }

    .project-overlay-tag {
        font-size: 0.52rem;
        padding: 3px 7px;
    }
}

@media (max-width: 600px) {
    .project-overlay-title {
        font-size: 0.88rem;
    }

    .project-overlay-subtitle {
        font-size: 0.65rem;
        line-height: 1.25;
    }

    .project-overlay-tag {
        font-size: 0.48rem;
        padding: 2px 6px;
    }
}

/* Mobile-only: back to home + visit live site above next projects (project pages) */
.mobile-project-actions {
    display: none;
    flex-wrap: wrap;
    gap: 10px;
    padding: 20px 20px 0;
    align-items: center;
    margin-bottom: 24px;
}

/* Restore sidebar bottom padding on project pages (no monster) */
.sidebar:has(.bio-container) { padding-bottom: 40px; }

/* --- SIDEBAR MOTION (home / playground) --- */
@property --sidebar-width {
    syntax: '<length-percentage>';
    inherits: true;
    initial-value: 30%;
}

@property --panel-width {
    syntax: '<percentage>';
    inherits: true;
    initial-value: 100%;
}

@property --sidebar-pad-x {
    syntax: '<length>';
    inherits: true;
    initial-value: 0px;
}

@keyframes sidebarFadeSlideIn {
    from {
        opacity: 0;
        transform: translateX(-18px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes sidebarShapePop {
    from {
        transform: scale(0) rotate(-12deg);
    }
    to {
        transform: scale(1) rotate(0deg);
    }
}

@keyframes sidebarShapeSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes sidebarLabelLineGrow {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

.sidebar-motion .hero-title-greeting {
    opacity: 0;
    animation: sidebarFadeSlideIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.sidebar-motion .hero-text h1 .hero-title-line {
    opacity: 0;
    animation: sidebarFadeSlideIn 0.65s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.sidebar-motion .hero-text h1 .hero-title-line:nth-child(1) {
    animation-delay: 0.08s;
}
.sidebar-motion .hero-text h1 .hero-title-line:nth-child(2) {
    animation-delay: 0.2s;
}
.sidebar-motion .hero-text h1 .hero-title-line:nth-child(3) {
    animation-delay: 0.32s;
}

.sidebar-motion .hero-text h1 .hero-title-line .shape {
    animation: sidebarShapePop 0.5s cubic-bezier(0.34, 1.45, 0.64, 1) forwards;
    transform-origin: center center;
    cursor: default;
}

.sidebar-motion .hero-text h1 .hero-title-line:nth-child(1) .shape {
    animation-delay: 0.28s;
}
.sidebar-motion .hero-text h1 .hero-title-line:nth-child(2) .shape {
    animation-delay: 0.4s;
}
.sidebar-motion .hero-text h1 .hero-title-line:nth-child(3) .shape {
    animation-delay: 0.52s;
}

.sidebar-motion .hero-text h1 .hero-title-line .shape:hover {
    animation: sidebarShapeSpin 0.55s ease-in-out;
}

.sidebar-motion .sidebar-intro {
    opacity: 0;
    animation: sidebarFadeSlideIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.48s forwards;
}

.sidebar-motion .sidebar-skills-block,
.sidebar-motion .sidebar-tools-block {
    opacity: 0;
    animation: sidebarFadeSlideIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.sidebar-motion .sidebar-skills-block {
    animation-delay: 0.62s;
}

.sidebar-motion .sidebar-tools-block {
    animation-delay: 0.78s;
}

.sidebar-motion .sidebar-tools-label {
    position: relative;
}

.sidebar-motion .sidebar-skills-block .sidebar-tools-label::after,
.sidebar-motion .sidebar-tools-block .sidebar-tools-label::after {
    content: "";
    display: block;
    height: 2px;
    width: 28px;
    margin-top: 6px;
    background: var(--accent-color);
    transform: scaleX(0);
    transform-origin: left center;
    animation: sidebarLabelLineGrow 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.sidebar-motion .sidebar-skills-block .sidebar-tools-label::after {
    animation-delay: 0.85s;
}

.sidebar-motion .sidebar-tools-block .sidebar-tools-label::after {
    animation-delay: 1s;
}

@media (prefers-reduced-motion: reduce) {
    .sidebar-motion .hero-title-greeting,
    .sidebar-motion .hero-text h1 .hero-title-line,
    .sidebar-motion .hero-text h1 .hero-title-line .shape,
    .sidebar-motion .sidebar-intro,
    .sidebar-motion .sidebar-skills-block,
    .sidebar-motion .sidebar-tools-block {
        opacity: 1;
        transform: none;
        animation: none !important;
    }
    .sidebar-motion .sidebar-skills-block .sidebar-tools-label::after,
    .sidebar-motion .sidebar-tools-block .sidebar-tools-label::after {
        transform: scaleX(1);
        animation: none;
    }
    .sidebar-motion .hero-text h1 .hero-title-line .shape:hover {
        animation: none;
    }
    .sidebar-motion--project .back-btn,
    .sidebar-motion--project .hero-text h1,
    .sidebar-motion--project .hero-text .sidebar-meta-value,
    .sidebar-motion--project .sidebar-tags,
    .sidebar-motion--project .sidebar-scroll-spy,
    .sidebar-motion--project .sidebar-visit-wrap,
    .sidebar-motion--project .bio-container,
    .sidebar-motion.sidebar-motion--project {
        opacity: 1;
        transform: none;
        animation: none !important;
    }
}

@media (max-width: 1200px) and (prefers-reduced-motion: no-preference) {
    .sidebar-motion.sidebar-motion--project {
        opacity: 0;
        transform: translateY(16px);
        animation: sidebarPanelSlideInMobile 0.65s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    }
}

@keyframes sidebarPanelSlideInMobile {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Project pages — main content enter */
@media (prefers-reduced-motion: no-preference) {
    .case-enter:not(.is-entered) {
        opacity: 0;
        transition:
            opacity 0.72s cubic-bezier(0.22, 1, 0.36, 1),
            transform 0.72s cubic-bezier(0.22, 1, 0.36, 1);
        transition-delay: var(--case-enter-delay, 0ms);
    }
    .case-enter--section:not(.is-entered) {
        transform: translateY(28px);
    }
    .case-enter.is-entered {
        opacity: 1;
        transform: translateX(0) translateY(0);
    }
}
@media (prefers-reduced-motion: reduce) {
    .case-enter {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

/* --- TITLE SHAPES --- */
.shape {
    display: inline-block;
    vertical-align: middle;
    margin-left: 0.1em;
    margin-bottom: 0.1em;
}
.shape-circle { width: 0.65em; height: 0.65em; background-color: rgb(46, 204, 113); border-radius: 50%; }
.shape-square { width: 0.65em; height: 0.65em; background-color: #4A55E0; }
.shape-triangle {
    width: 0;
    height: 0;
    border-left: 0.35em solid transparent;
    border-right: 0.35em solid transparent;
    border-bottom: 0.65em solid #E8E258;
}

/* --- SIDEBAR SOCIALS (home) --- */
.sidebar-socials {
    margin-top: auto;
    padding-top: 28px;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}
.sidebar-about-quick-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 76px;
    height: 34px;
    min-height: 34px;
    box-sizing: border-box;
    border-radius: 18px;
    border: 1px solid rgba(17, 17, 17, 0.16);
    background: #ffffff;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.sidebar-about-quick-link img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 22%;
    transition: opacity 0.22s ease, transform 0.22s ease;
}
.sidebar-about-quick-link__label {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(0.92);
    transform-origin: center center;
    opacity: 0;
    pointer-events: none;
    white-space: nowrap;
    padding: 0;
    border-radius: 999px;
    border: none;
    background: transparent;
    color: #ffffff;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: opacity 0.24s ease, transform 0.24s ease;
}
.sidebar-about-quick-link:hover,
.sidebar-about-quick-link:focus-visible {
    background: var(--accent-color);
    border-color: var(--accent-color);
    box-shadow: 0 6px 16px rgba(var(--brand-rgb), 0.22);
    outline: none;
}
.sidebar-about-quick-link:hover img,
.sidebar-about-quick-link:focus-visible img {
    opacity: 0;
    transform: scale(0.98);
}
.sidebar-about-quick-link:hover .sidebar-about-quick-link__label,
.sidebar-about-quick-link:focus-visible .sidebar-about-quick-link__label {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}
.sidebar-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
    text-decoration: none;
    border: 2px solid var(--border-color);
    background: transparent;
    transition: transform 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.sidebar-social-link:hover,
.sidebar-social-link:focus-visible {
    transform: scale(1.08);
    border-color: var(--accent-color);
    color: var(--accent-color);
    background: transparent;
}
.sidebar-social-link:not(.sidebar-resume-link) {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}
.sidebar-social-link i.fas,
.sidebar-social-link i.fab {
    font-size: 22px;
}
.sidebar-resume-link {
    padding: 12px 22px;
    min-height: 48px;
    box-sizing: border-box;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    border-radius: 28px;
}
.sidebar-motion .sidebar-socials {
    opacity: 0;
    animation: sidebarFadeSlideIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.9s forwards;
}
@media (prefers-reduced-motion: reduce) {
    .sidebar-motion .sidebar-socials {
        opacity: 1;
        animation: none !important;
    }
}

.site-footer.site-footer--sidebar-socials {
    justify-content: center;
}

.footer-tech-link {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.footer-tech-link:hover,
.footer-tech-link:focus-visible {
    opacity: 0.75;
}

/* --- FOOTER SOCIAL ICONS --- */
.site-footer .socials { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.site-footer .socials > span { font-size: 0.85rem; }
.site-footer .socials .connect-label { margin-right: 6px; }
.site-footer .socials a {
    color: var(--accent-color);
    font-size: 12px;
    margin-left: 0px;
    text-decoration: none;
    background: none;
    transition: transform 0.2s, color 0.2s, background-color 0.2s, border-color 0.2s;
}
.site-footer .socials .social-link:not(.resume-link) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1px solid transparent;
    background: none;
}
.site-footer .socials .social-link:not(.resume-link):hover {
    transform: scale(1.08);
}
[data-theme="light"] .site-footer .socials .social-link:not(.resume-link):hover {
    color: #111111;
    background-color: transparent;
    border-color: var(--accent-color);
}
[data-theme="dark"] .site-footer .socials .social-link:not(.resume-link):hover {
    color: #ffffff;
    background-color: transparent;
    border-color: var(--accent-color);
}
.site-footer .socials i.fas { font-size: 16px; }
.site-footer .socials i.fab { font-size: 16px; }

/* Footer Contact Buttons */
.site-footer .socials .contact-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 18px;
    background: var(--accent-color);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 24px;
    text-decoration: none;
    transition: transform 0.2s, background-color 0.2s;
}
.site-footer .socials .contact-btn:hover {
    transform: scale(1.05);
    background-color: var(--brand-deep);
}
.site-footer .socials .contact-btn i { font-size: 1rem; }

/* Resume Link */
.resume-link {
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    padding: 4px 14px;
    border: 1px solid var(--accent-color);
    border-radius: 20px;
    color: var(--accent-color);
    margin-left: 5px;
    transition: background-color 0.2s, color 0.2s;
}
.resume-link:hover {
    background-color: var(--accent-color);
    color: #fff;
}

/* --- SIDEBAR METADATA (Project pages) --- */
.sidebar:has(.sidebar-scroll-spy) {
    min-height: 0;
}
.sidebar:has(.sidebar-scroll-spy) .sidebar-top {
    flex-shrink: 0;
}
.content-wrapper.sidebar-compact-scope--project .sidebar:has(.sidebar-scroll-spy) .sidebar-top {
    flex: 0 0 auto;
    flex-shrink: 0;
}
.sidebar-scroll-spy {
    margin-top: auto;
    flex-shrink: 0;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}
@media (min-width: 1201px) {
    .sidebar:has(.sidebar-scroll-spy):has(.sidebar-socials) .sidebar-socials {
        margin-top: 0;
        padding-top: 24px;
        flex-shrink: 0;
    }
}
.sidebar-scroll-spy-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.sidebar-scroll-spy-link {
    display: block;
    font-size: 0.58rem;
    font-weight: 400;
    line-height: 1.4;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--secondary-text);
    text-decoration: none;
    padding: 2px 0 2px 12px;
    border-left: 3px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}
.sidebar-scroll-spy-link:hover,
.sidebar-scroll-spy-link.is-active {
    color: var(--text-color);
    border-left-color: var(--accent-color);
}
.sidebar-scroll-spy-link.is-active {
    font-weight: 700;
    color: var(--text-color);
}
.sidebar-meta {
    border-top: 1px solid var(--border-color);
    padding-top: 0;
    margin-top: 20px;
}
.sidebar-meta-item {
    margin-top: 16px;
    margin-bottom: 16px;
}
.sidebar-meta-label {
    display: block;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--secondary-text);
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}
.sidebar-meta-value {
    display: block;
    font-size: 0.85rem;
    line-height: 1.4;
    color: var(--text-color);
}

/* Sidebar project meta — 2×2 grid (role, team, timeline, tools) */
.content-wrapper.sidebar-compact-scope--project .sidebar-project-meta {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.content-wrapper.sidebar-compact-scope--project .sidebar-project-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 14px;
}

.content-wrapper.sidebar-compact-scope--project .sidebar-project-meta-grid--cols-1 {
    grid-template-columns: minmax(0, 1fr);
}

.content-wrapper.sidebar-compact-scope--project .sidebar-project-meta-cell {
    min-width: 0;
}

.content-wrapper.sidebar-compact-scope--project .sidebar-project-meta-cell--team {
    grid-column: 1 / -1;
}

.content-wrapper.sidebar-compact-scope--project .sidebar-project-meta-label {
    display: block;
    margin-bottom: 9px;
    font-size: 0.5rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #b0b0b0;
}

[data-theme="dark"] .content-wrapper.sidebar-compact-scope--project .sidebar-project-meta-label {
    color: rgba(255, 255, 255, 0.45);
}

.content-wrapper.sidebar-compact-scope--project .sidebar-project-meta-value {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.01em;
    color: #3f4f46;
}

.content-wrapper.sidebar-compact-scope--project.sidebar-compact .sidebar-project-meta-value {
    font-size: 0.68rem;
}

[data-theme="dark"] .content-wrapper.sidebar-compact-scope--project .sidebar-project-meta-value {
    color: #b8c4bc;
}

.content-wrapper.sidebar-compact-scope--project .sidebar-project-meta-timeline {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.content-wrapper.sidebar-compact-scope--project .sidebar-project-meta-timeline-sep {
    font-size: 0.58rem;
    font-weight: 500;
    line-height: 1;
    color: #8a8a8a;
}

[data-theme="dark"] .content-wrapper.sidebar-compact-scope--project .sidebar-project-meta-timeline-sep {
    color: rgba(255, 255, 255, 0.38);
}

.content-wrapper.sidebar-compact-scope--project .sidebar-project-meta-team-text {
    display: block;
    font-size: inherit;
    font-weight: inherit;
    line-height: 1.35;
    color: inherit;
}

.content-wrapper.sidebar-compact-scope--project .sidebar-project-meta-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
}

.content-wrapper.sidebar-compact-scope--project .sidebar-project-meta-tool-icon,
.content-wrapper.sidebar-compact-scope--project .sidebar-project-meta-tool-chip {
    position: relative;
}

.content-wrapper.sidebar-compact-scope--project .sidebar-project-meta-tool-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
}

.content-wrapper.sidebar-compact-scope--project .sidebar-project-meta-tool-tip {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 2;
    padding: 2px 5px;
    border-radius: 4px;
    background: #3f4f46;
    color: #ffffff;
    font-size: 0.48rem;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.01em;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transform: translate(35%, -70%);
    transition: opacity 0.15s ease;
}

[data-theme="dark"] .content-wrapper.sidebar-compact-scope--project .sidebar-project-meta-tool-tip {
    background: #b8c4bc;
    color: #1a1a1a;
}

.content-wrapper.sidebar-compact-scope--project .sidebar-project-meta-tool-icon:hover .sidebar-project-meta-tool-tip,
.content-wrapper.sidebar-compact-scope--project .sidebar-project-meta-tool-icon:focus-visible .sidebar-project-meta-tool-tip,
.content-wrapper.sidebar-compact-scope--project .sidebar-project-meta-tool-chip:hover .sidebar-project-meta-tool-tip,
.content-wrapper.sidebar-compact-scope--project .sidebar-project-meta-tool-chip:focus-visible .sidebar-project-meta-tool-tip {
    opacity: 1;
}

.content-wrapper.sidebar-compact-scope--project .sidebar-project-meta-tool-icon img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: brightness(0) saturate(100%) invert(33%) sepia(5%) saturate(534%) hue-rotate(169deg) brightness(94%) contrast(88%);
}

[data-theme="dark"] .content-wrapper.sidebar-compact-scope--project .sidebar-project-meta-tool-icon img {
    filter: brightness(0) saturate(100%) invert(78%) sepia(4%) saturate(247%) hue-rotate(169deg) brightness(92%) contrast(88%);
}

.content-wrapper.sidebar-compact-scope--project .sidebar-project-meta-tool-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 18px;
    padding: 0 4px;
    border-radius: 5px;
    background: rgba(63, 79, 70, 0.12);
    color: #3f4f46;
    font-size: 0.5rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

[data-theme="dark"] .content-wrapper.sidebar-compact-scope--project .sidebar-project-meta-tool-chip {
    background: rgba(184, 196, 188, 0.12);
    color: #b8c4bc;
}

.sidebar-tags {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.sidebar-tag {
    font-size: 0.62rem;
    padding: 3px 9px;
    border: 1px solid var(--accent-color);
    border-radius: 20px;
    color: var(--accent-color);
    text-transform: uppercase;
    font-weight: 600;
}

/* --- NEXT PROJECTS SECTION --- */
.next-projects-section {
    border-top: 1px solid var(--border-color);
    padding: 40px 30px;
}
.next-projects-title {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    margin-bottom: 24px;
}
.next-projects-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
.next-project-card {
    cursor: pointer;
    display: flex;
    flex-direction: column;
}
.next-project-img {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #eee;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 12px;
    border: 1px solid transparent;
    transition: border-color 0.3s ease, transform 0.35s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.next-project-img::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.96) 100%);
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
    z-index: 1;
}
.next-project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.next-project-card:hover .next-project-img {
    border-color: var(--accent-color);
    transform: none;
}
.next-project-card:active .next-project-img {
    transform: none;
}
.next-project-card:hover .next-project-img::before,
.next-project-card:hover .next-project-img .project-overlay {
    opacity: 1;
}
.next-project-card:hover .next-project-img .project-overlay {
    transform: translateY(0);
}
.next-project-info { display: none; }

/* --- Case hero img with actual image --- */
.case-hero-img img { width: 100%; height: 100%; object-fit: cover; }

/* --- About Page --- */
.about-page {
    width: 100%;
    overflow-x: hidden;
    background: var(--bg-color);
    color: var(--text-color);
    flex: 1 0 auto;
}
.app-root-about .about-page,
.app-root-about .scroll-area {
    overflow-x: hidden;
}
.about-main {
    display: flex;
    flex-direction: column;
    width: 100%;
}
.about-intro {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    padding: 40px clamp(24px, 5vw, 64px) 32px;
}
.about-home-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: flex-start;
    margin: 0 20px;
    padding: 8px 14px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    color: var(--text-color);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    margin-bottom: 16px;
    transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}
.about-home-link:hover {
    color: var(--accent-color);
    border-color: var(--accent-color);
    background-color: rgba(var(--brand-rgb), 0.08);
}
.about-cta {
    width: min(100% - 40px, 1200px);
    margin: 24px auto 88px;
}
.about-cta__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px 28px;
    align-items: center;
}
.about-cta__title {
    margin: 0;
    font-size: clamp(1.35rem, 2.6vw, 1.9rem);
    line-height: 1.2;
}
.about-cta__copy {
    margin: 10px 0 0;
    color: var(--secondary-text);
    font-size: 0.92rem;
    line-height: 1.65;
    max-width: 640px;
}
.about-cta__actions {
    display: inline-flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.about-cta__actions .site-contact-btn--primary,
.about-cta__actions .site-contact-btn--outline {
    border-width: 1px;
}
.about-cta__socials {
    grid-column: 1 / -1;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.about-cta__socials .sidebar-social-link {
    border-color: rgba(17, 17, 17, 0.16);
}
.about-intro h1 {
    font-size: clamp(2rem, 6vw, 4rem);
    line-height: 1.2;
    margin-bottom: 32px;
}
.about-intro p {
    max-width: 600px;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--secondary-text);
}
.about-section-heading {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--secondary-text);
    margin: 0 0 18px;
}
.about-experience {
    margin-top: 40px;
    margin-bottom: 48px;
    max-width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px 40px;
    align-items: start;
}
.about-experience > * {
    min-width: 0;
}
.about-exp-group {
    margin: 0;
    padding: 0;
    background: transparent;
    border-bottom: none;
}
.about-exp-group .about-section-heading {
    margin: 0 0 18px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--accent-color);
    display: flex;
    align-items: center;
    gap: 10px;
}
.about-exp-group .about-section-heading::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
    background: var(--accent-color);
}
.about-exp-group--work .about-section-heading {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}
.about-exp-group--work .about-section-heading::before {
    background: var(--accent-color);
}
.about-exp-group--education .about-section-heading {
    color: var(--text-color);
    border-bottom-color: var(--accent-blue);
}
.about-exp-group--education .about-section-heading::before {
    background: var(--accent-blue);
}
.about-exp-group--toolbox .about-section-heading {
    color: var(--text-color);
    border-bottom-color: var(--accent-yellow);
}
.about-exp-group--toolbox .about-section-heading::before {
    background: var(--accent-yellow);
}
.about-exp-group--highlights .about-section-heading {
    color: var(--text-color);
    border-bottom-color: var(--accent-yellow);
}
.about-exp-group--highlights .about-section-heading::before {
    background: var(--accent-yellow);
}
.about-experience-list {
    list-style: none;
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
}
.about-exp-group--work .about-experience-list,
.about-exp-group--education .about-experience-list {
    position: relative;
    padding-left: 20px;
}
.about-exp-group--work .about-experience-list::before,
.about-exp-group--education .about-experience-list::before {
    content: "";
    position: absolute;
    top: 6px;
    bottom: 6px;
    left: 6px;
    width: 2px;
    background: rgba(17, 17, 17, 0.14);
}
.about-exp-item {
    display: grid;
    grid-template-columns: 128px 1fr;
    gap: 20px;
    align-items: start;
    padding: 18px 8px 22px 32px;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.15s ease, transform 0.2s ease;
    position: relative;
}
.about-exp-group--work .about-exp-item::before,
.about-exp-group--education .about-exp-item::before {
    content: "";
    position: absolute;
    left: -20px;
    top: calc(18px + (0.68rem * 1.5) / 2 - 5px);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    box-shadow: 0 0 0 1px rgba(17, 17, 17, 0.1);
}
.about-exp-group--work .about-exp-item {
    border-bottom-color: rgba(var(--brand-rgb), 0.22);
}
.about-exp-group--work .about-exp-item::before {
    background: var(--accent-color);
}
.about-exp-group--education .about-exp-item {
    border-bottom-color: var(--accent-blue-border);
}
.about-exp-group--education .about-exp-item::before {
    background: var(--accent-blue);
}
.app-root-about .about-exp-group--work .about-experience-list,
.app-root-about .about-exp-group--education .about-experience-list {
    padding-left: 0;
}
.app-root-about .about-exp-group--work .about-experience-list::before,
.app-root-about .about-exp-group--education .about-experience-list::before,
.app-root-about .about-exp-group--work .about-exp-item::before,
.app-root-about .about-exp-group--education .about-exp-item::before {
    display: none;
}
.app-root-about .about-exp-item {
    padding-left: 8px;
}
.about-exp-group--highlights .about-exp-item {
    border-bottom-color: var(--accent-yellow-border);
}
.about-exp-item:last-child {
    border-bottom: none;
}
.about-exp-item:hover {
    background: transparent;
}
.about-exp-group--work .about-exp-item:hover {
    background: rgba(var(--brand-rgb), 0.05);
    transform: translateX(3px);
}
.about-exp-group--education .about-exp-item:hover {
    background: var(--accent-blue-soft);
    transform: translateX(3px);
}
.about-exp-group--highlights .about-exp-item:hover {
    background: var(--accent-yellow-soft);
}
.about-exp-period {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-color);
    line-height: 1.5;
}
.about-exp-title {
    font-size: 0.92rem;
    font-weight: 800;
    color: var(--text-color);
    margin: 0 0 4px;
    line-height: 1.35;
}
.about-exp-org {
    font-size: 0.82rem;
    color: var(--secondary-text);
    margin: 0;
    line-height: 1.6;
}
.about-exp-desc {
    font-size: 0.82rem;
    color: var(--secondary-text);
    margin: 8px 0 0;
    line-height: 1.65;
}
.about-interests {
    margin: 0;
    padding: 0;
    border-top: none;
    max-width: 100%;
}
.about-interests .about-section-heading {
    margin: 0 0 18px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--accent-color);
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--accent-color);
}
.about-interests .about-section-heading::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
    background: var(--accent-color);
}
.about-interests-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.about-interest-item {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 18px 20px;
    background: var(--bg-color);
    transition: background 0.15s ease, border-color 0.15s ease;
    min-width: 0;
}
.about-interest-item:hover {
    background: rgba(var(--brand-rgb), 0.04);
    border-color: rgba(var(--brand-rgb), 0.35);
}
.about-interest-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0;
}
.about-interest-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(var(--brand-rgb), 0.12);
    color: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}
.about-interest-title {
    font-size: 0.92rem;
    font-weight: 800;
    color: var(--text-color);
    line-height: 1.3;
}
/* --- ABOUT PAGE SCROLL CAROUSEL --- */
.about-carousel {
    width: 100%;
    overflow: hidden;
    padding: 30px 0 30px 30px;
    position: relative;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.about-carousel::-webkit-scrollbar,
.about-carousel-track::-webkit-scrollbar {
    display: none;
    height: 0;
    width: 0;
}
.about-carousel-track {
    display: flex;
    gap: 16px;
    width: max-content;
    will-change: transform;
    /* Fast snap for scroll-driven movement */
    transition: transform 0.08s linear;
}
.about-carousel-item {
    flex-shrink: 0;
    width: clamp(320px, 38vw, 480px);
    height: clamp(213px, 25vw, 320px);
    border-radius: 10px;
    overflow: hidden;
    background: var(--border-color);
}
.about-carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}
.about-carousel-item:hover img {
    transform: scale(1.04);
}

.about-monster-band {
    margin-top: auto;
    width: 100%;
    position: relative;
}
.about-monster-band .monster-container {
    width: 100%;
    height: min(32vh, 260px);
    align-items: flex-end;
}
.about-monster-band .monster-body {
    width: 120%;
    left: -10%;
}

/* Home content column — shared max width */
.home-page-header,
.home-featured-edge,
#featured-work.project-grid,
#home-can-bring.home-can-bring {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    box-sizing: border-box;
}

/* Home page header (intro + scroll spy + socials above project list) */
.home-page-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(340px, 560px);
    grid-template-rows: 1fr auto;
    gap: 24px 32px;
    align-items: stretch;
    padding: 0 30px 80px;
    overflow: visible;
    min-height: 100vh;
    min-height: 100dvh;
}
.home-page-header-main {
    min-width: 0;
    grid-row: 1;
    grid-column: 1;
    display: flex;
    flex-direction: column;
}
.home-page-header .hero-text {
    flex: 1;
    min-height: 52vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 64px 0 32px;
    box-sizing: border-box;
}
.home-page-header-aside {
    grid-row: 1;
    grid-column: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 16px;
    justify-content: center;
    justify-self: end;
    align-self: stretch;
    width: 100%;
    max-width: 560px;
    min-height: 100%;
    padding-top: 0;
    padding-right: 8px;
    box-sizing: border-box;
    overflow: visible;
}
.home-header-composition {
    --comp-tilt-x: 0deg;
    --comp-tilt-y: -3deg;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
    max-width: 540px;
    margin-right: 24px;
    perspective: 900px;
    pointer-events: auto;
    overflow: visible;
}
.home-header-composition__float {
    width: min(100%, 520px);
    transform:
        rotate(var(--comp-tilt-y))
        rotateX(var(--comp-tilt-x));
    transform-origin: 50% 58%;
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
    overflow: visible;
}
.home-header-composition__stage {
    position: relative;
    width: 100%;
    overflow: visible;
    filter: drop-shadow(0 16px 32px rgba(0, 0, 0, 0.1));
    transition: filter 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.home-header-composition.is-interacting .home-header-composition__stage {
    filter: drop-shadow(0 22px 44px rgba(0, 0, 0, 0.14));
}
.home-header-composition__canvas-wrap {
    --portrait-left: 18.94%;
    --portrait-right: 12.73%;
    --portrait-top: 7.39%;
    --portrait-bottom: 4.77%;
    position: absolute;
    top: var(--portrait-top);
    right: var(--portrait-right);
    bottom: var(--portrait-bottom);
    left: var(--portrait-left);
    z-index: 0;
    overflow: visible;
    pointer-events: none;
}
.home-header-composition__canvas {
    position: absolute;
    inset: 0;
    background: #faf7f2;
    border-radius: 2px;
}
.home-header-composition__selection {
    position: absolute;
    top: -3.2%;
    right: -4.8%;
    bottom: -3.2%;
    left: -4.8%;
    border: 1.5px dashed #a259ff;
    border-radius: 2px;
    opacity: 0.9;
    transition:
        opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1),
        border-color 0.35s ease,
        filter 0.4s ease;
}
.home-header-composition.is-interacting .home-header-composition__selection {
    opacity: 1;
    border-color: #8f4ae6;
    filter: drop-shadow(0 0 8px rgba(162, 89, 255, 0.22));
}
.home-header-composition__frame {
    position: absolute;
    inset: 0;
    border-top: 1.5px dashed #a259ff;
    border-bottom: 1.5px dashed #a259ff;
    border-left: 1.5px dashed #1abcfe;
    border-right: 1.5px dashed #1abcfe;
    transition: border-color 0.35s ease, opacity 0.35s ease;
}
.home-header-composition.is-interacting .home-header-composition__frame {
    border-top-color: #933ff0;
    border-bottom-color: #933ff0;
    border-left-color: #12b0ef;
    border-right-color: #12b0ef;
}
.home-header-composition__handle {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #fff;
    border: 1.5px solid #a259ff;
    border-radius: 1px;
    transform: translate(-50%, -50%);
    transition:
        transform 0.42s cubic-bezier(0.22, 1, 0.36, 1),
        border-color 0.35s ease,
        background-color 0.35s ease,
        box-shadow 0.35s ease;
}
.home-header-composition.is-interacting .home-header-composition__handle {
    transform: translate(-50%, -50%) scale(1.18);
    border-color: #8f4ae6;
    box-shadow: 0 0 0 2px rgba(162, 89, 255, 0.12);
}
.home-header-composition__handle--tl { top: 0; left: 0; }
.home-header-composition__handle--tr { top: 0; left: 100%; }
.home-header-composition__handle--bl { top: 100%; left: 0; }
.home-header-composition__handle--br { top: 100%; left: 100%; }
.home-header-composition__handle--tm { top: 0; left: 50%; }
.home-header-composition__handle--bm { top: 100%; left: 50%; }
.home-header-composition__handle--lm { top: 50%; left: 0; }
.home-header-composition__handle--rm { top: 50%; left: 100%; }
.home-header-composition__measure {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 16px;
    padding: 0 6px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.02em;
    color: #fff;
    white-space: nowrap;
    transition:
        transform 0.42s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.35s ease,
        filter 0.35s ease;
}
.home-header-composition.is-interacting .home-header-composition__measure {
    filter: brightness(1.08);
}
.home-header-composition.is-interacting .home-header-composition__measure--width {
    transform: translateX(-50%) scale(1.06);
}
.home-header-composition.is-interacting .home-header-composition__measure--height {
    transform: translateY(-50%) scale(1.06);
}
.home-header-composition__measure--width {
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: #a259ff;
}
.home-header-composition__measure--height {
    top: 50%;
    right: -24px;
    transform: translateY(-50%);
    min-width: 16px;
    min-height: 30px;
    padding: 4px 0;
    writing-mode: vertical-rl;
    background: #1abcfe;
}
.home-header-composition__tick {
    position: absolute;
    background: #f24e1e;
    pointer-events: none;
    transition:
        transform 0.42s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.35s ease;
}
.home-header-composition.is-interacting .home-header-composition__tick {
    opacity: 0.92;
    transform: scale(1.12);
}
.home-header-composition__tick--top-left-h {
    top: -10px;
    left: 12%;
    width: 14px;
    height: 2px;
}
.home-header-composition__tick--top-left-v {
    top: -10px;
    left: 12%;
    width: 2px;
    height: 10px;
}
.home-header-composition__tick--top-right-h {
    top: -10px;
    right: 12%;
    width: 14px;
    height: 2px;
}
.home-header-composition__tick--top-right-v {
    top: -10px;
    right: 12%;
    width: 2px;
    height: 10px;
}
.home-header-composition__tick--bottom-left-h {
    bottom: -10px;
    left: 12%;
    width: 14px;
    height: 2px;
    background: #0acf83;
}
.home-header-composition__tick--bottom-left-v {
    bottom: -10px;
    left: 12%;
    width: 2px;
    height: 10px;
    background: #0acf83;
}
.home-header-composition__art {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    overflow: visible;
}
.home-header-composition__art svg,
.home-header-composition__art img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 825 / 1110;
    overflow: visible;
    pointer-events: none;
    user-select: none;
}
.home-header-composition__svg .comp-parallax {
    transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}
.home-header-composition.is-interacting .comp-portrait .comp-anim,
.home-header-composition.is-interacting .comp-dots .comp-anim {
    animation-play-state: paused;
}
.home-header-composition.is-interacting .comp-portrait .comp-parallax,
.home-header-composition.is-interacting .comp-dots .comp-parallax {
    transform: none !important;
}
@media (prefers-reduced-motion: reduce) {
    .home-header-composition__float {
        transform: rotate(-3deg);
    }
}
.home-hero-greeting-row {
    display: flex;
    align-items: center;
    justify-content: left;
    gap: 20px;
    width: 100%;
    padding-top: 16px;
    padding-bottom: 12px;
}
.home-hero-greeting-row--socials-only {
    justify-content: flex-end;
    padding-bottom: 8px;
}
.home-hero-greeting-row .hero-title-greeting {
    display: inline-block;
    margin: 0;
    padding-top: 0;
    width: auto;
    max-width: none;
    flex: none;
    align-self: center;
}
.home-page-header .home-hero-greeting-row .sidebar-socials {
    flex: 0 0 auto;
    margin-top: 0;
    justify-content: flex-start;
}
.home-page-header .hero-social-cluster {
    gap: 10px;
}
.home-header-tech {
    display: none;
}
.home-header-tech-text {
    margin: 0;
    max-width: 300px;
    font-size: 0.76rem;
    line-height: 1.35;
    color: var(--secondary-text);
    text-align: right;
}
.home-header-tech-host {
    display: block;
    margin-top: 0;
}
.home-header-tech-inline {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: inherit;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    vertical-align: baseline;
    transition: color 0.2s ease;
}
.home-header-tech-inline:hover,
.home-header-tech-inline:focus-visible {
    color: var(--accent-color);
    outline: none;
}
.home-header-tech-logo {
    width: 13px;
    height: 13px;
    display: block;
    flex-shrink: 0;
}
.home-header-tech-inline .fab.fa-github {
    font-size: 13px;
    line-height: 1;
}
.home-header-tech-logo--claude {
    color: #cc785c;
}
.home-header-tech-inline:hover .home-header-tech-logo--claude,
.home-header-tech-inline:focus-visible .home-header-tech-logo--claude {
    color: #e39b7d;
}
.home-page-header .hero-text h1 {
    font-size: clamp(2rem, 4.2vw, 3.15rem);
    max-width: 820px;
    line-height: 1.3;
    letter-spacing: -0.02em;
    margin-bottom: 4px;
}
.home-page-header .hero-title-line {
    display: block;
    max-width: 100%;
}
.home-page-header .hero-title-line--meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35em;
    font-size: 0.42em;
    font-weight: 700;
    line-height: 1.45;
    margin-bottom: 0.1em;
}
.home-page-header .hero-title-line--greeting {
    display: block;
    color: var(--accent-color);
    font-weight: 700;
}
.home-page-header .hero-greeting-role {
    display: block;
    margin-top: 0.12em;
    font-weight: 700;
    color: var(--accent-color);
}
.hero-greeting-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px 20px;
    width: 100%;
    max-width: 820px;
    margin-top: 6px;
    margin-bottom: 0;
}
.home-page-header .hero-greeting-row {
    margin-top: 0;
}
.hero-social-cluster {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}
.hero-identity-label {
    margin: 0;
    font-size: clamp(1.5rem, 3.5vw, 1.95rem);
    font-weight: 700;
    line-height: 42px;
    min-height: 42px;
    color: var(--accent-color);
}
.hero-greeting-row .sidebar-socials {
    flex: 0 0 auto;
    margin: 0;
    padding: 0;
    gap: 10px;
}
.home-page-header .hero-meta-dot {
    width: 0.55em;
    height: 0.55em;
    margin: 0;
    flex-shrink: 0;
}
.home-page-header .hero-meta-name {
    font-weight: 700;
    color: #111111;
}
.home-page-header .hero-meta-sep {
    color: rgba(17, 17, 17, 0.32);
    font-weight: 400;
}
.home-page-header .hero-meta-role {
    font-weight: 600;
    color: rgba(17, 17, 17, 0.55);
}
.home-page-header .hero-title-line--focus {
    font-size: 0.94em;
    font-weight: 800;
    margin-top: 0.06em;
    line-height: 1.08;
}
.home-page-header .hero-title-line--meta + .hero-title-line--focus {
    margin-top: 0.32em;
}
.home-page-header .hero-title-line--focus + .hero-title-line--focus {
    margin-top: 0.02em;
}
.home-page-header .hero-title-line--focus .shape {
    flex-shrink: 0;
    margin-left: 0.2em;
    margin-right: 0.14em;
}
.home-page-header .sidebar-intro {
    max-width: 520px;
    margin-top: 14px;
    margin-bottom: 0;
    line-height: 1.7;
}
.home-page-header .sidebar-intro a {
    color: inherit;
    font-weight: 700;
    text-decoration: underline;
    text-decoration-color: rgba(var(--brand-rgb), 0.55);
    text-underline-offset: 3px;
}
.home-page-header .sidebar-intro a:hover,
.home-page-header .sidebar-intro a:focus-visible {
    color: var(--accent-color);
    text-decoration-color: var(--accent-color);
    outline: none;
}
.home-hero-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 12px;
    width: 100%;
    max-width: 640px;
    margin-top: 28px;
}
.home-hero-actions--socials {
    margin-top: 22px;
}
.home-hero-cta-wrap {
    grid-column: 1 / -1;
    grid-row: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 8px 0 0;
    margin-top: auto;
    overflow: visible;
}
.home-hero-cta-cluster {
    position: relative;
    display: inline-block;
    overflow: visible;
}
.home-hero-cta-arrow {
    position: absolute;
    left: 100%;
    top: 50%;
    margin-left: 8px;
    width: 88px;
    height: 60px;
    color: #111111;
    opacity: 1;
    pointer-events: none;
    overflow: visible;
    z-index: 2;
    transform-origin: 14px 30px; /* arrowhead tip — fan pivots near the button */
}
/* Two fanning arrows pointing back at the button */
.home-hero-cta-arrow--a {
    transform: translateY(-50%) translateY(-11px) rotate(-11deg);
}
.home-hero-cta-arrow--b {
    transform: translateY(-50%) translateY(10px) rotate(9deg);
}
.home-hero-cta-arrow__svg {
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
}
.home-hero-cta-arrow__shaft,
.home-hero-cta-arrow__head {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
}
.home-hero-cta-wrap.is-revealed .home-hero-cta-arrow__shaft {
    animation: home-hero-cta-arrow-draw 0.7s cubic-bezier(0.45, 0, 0.2, 1) forwards 0.25s;
}
.home-hero-cta-wrap.is-revealed .home-hero-cta-arrow__head {
    animation: home-hero-cta-arrow-draw 0.3s cubic-bezier(0.45, 0, 0.2, 1) forwards 0.85s;
}
.home-hero-cta-cluster:hover .home-hero-cta-arrow__shaft {
    animation: home-hero-cta-arrow-draw 0.5s cubic-bezier(0.45, 0, 0.2, 1) forwards;
}
.home-hero-cta-cluster:hover .home-hero-cta-arrow__head {
    animation: home-hero-cta-arrow-draw 0.3s cubic-bezier(0.45, 0, 0.2, 1) forwards 0.5s;
}
@keyframes home-hero-cta-arrow-draw {
    to { stroke-dashoffset: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .home-hero-cta-arrow__shaft,
    .home-hero-cta-arrow__head {
        stroke-dashoffset: 0;
        animation: none;
    }
}
.home-hero-cta-hint {
    margin: 0;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(17, 17, 17, 0.42);
}
.home-hero-cta {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    min-width: 157px;
    padding: 10px 22px;
    border-radius: 999px;
    background: var(--accent-color);
    color: #111;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.home-hero-cta__label {
    position: relative;
    z-index: 1;
    transition: opacity 0.22s ease, transform 0.22s ease;
}
.home-hero-cta__eyes {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    opacity: 0;
    transform: translateY(8px) scale(0.82);
    transition: opacity 0.28s cubic-bezier(0.22, 1, 0.36, 1), transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
}
.home-hero-cta__eye {
    width: 25px;
    height: 20px;
    border-radius: 50%;
}
.home-hero-cta__eye::before,
.home-hero-cta__eye::after {
    display: none;
}
.home-hero-cta__eye .monster-pupil {
    width: 12px;
    height: 12px;
}
.home-hero-cta:hover,
.home-hero-cta:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(var(--brand-rgb), 0.28);
    outline: none;
}
.home-hero-cta:hover .home-hero-cta__eyes,
.home-hero-cta:focus-visible .home-hero-cta__eyes {
    opacity: 1;
    transform: translateY(0) scale(1);
}
.home-hero-cta:hover .home-hero-cta__label,
.home-hero-cta:focus-visible .home-hero-cta__label {
    opacity: 0;
    transform: translateY(4px);
}
.home-page-header .home-hero-actions .sidebar-socials {
    margin-top: 0;
    padding-top: 0;
    gap: 8px;
    justify-content: flex-start;
    flex: 0 0 auto;
}
@media (prefers-reduced-motion: reduce) {
    .home-hero-cta__eyes,
    .home-hero-cta__label {
        transition: none;
    }
    .home-hero-cta:hover .home-hero-cta__label,
    .home-hero-cta:focus-visible .home-hero-cta__label {
        opacity: 1;
        transform: none;
    }
    .home-hero-cta:hover .home-hero-cta__eyes,
    .home-hero-cta:focus-visible .home-hero-cta__eyes {
        opacity: 0;
        transform: translateY(8px) scale(0.82);
    }
}
.home-page-header .sidebar-social-link:not(.sidebar-resume-link) {
    width: 42px;
    height: 42px;
    border-width: 1px;
}
.home-page-header .sidebar-social-link i.fas,
.home-page-header .sidebar-social-link i.fab {
    font-size: 18px;
}
.home-page-header .sidebar-resume-link {
    padding: 8px 14px;
    min-height: 42px;
    font-size: 0.82rem;
    border-radius: 22px;
    border-width: 1px;
}
.home-page-header .sidebar-about-quick-link {
    width: 94px;
    height: 42px;
    min-height: 42px;
    border-radius: 22px;
    border-width: 1px;
}
.home-page-header .sidebar-about-quick-link__label {
    font-size: 0.76rem;
}

/* About page: full-width layout (no sidebar) */
.app-root-about .sidebar,
.app-root-home .sidebar { display: none !important; }
.app-root-about .content-wrapper-fullwidth,
.app-root-home .content-wrapper-fullwidth {
    width: 100%;
    height: 100vh;
    flex-grow: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.app-root-about .right-panel-fullwidth,
.app-root-home .right-panel-fullwidth {
    width: 100%;
    height: 100%;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.app-root-about .right-panel-fullwidth .scroll-area,
.app-root-home .right-panel-fullwidth .scroll-area {
    flex: 1 1 0;
    min-height: 0;
    height: 0;
    /* Real scrollable box (was overflow:hidden while Lenis drove scrollTop) so
       native wheel + keyboard scrolling work */
    overflow-y: auto;
    overflow-x: hidden;
}

/* Back to home on about: visible only on mobile */
.about-home-link-mobile-only { display: none; }

/* Playground back to home: visible only on mobile */
.back-btn-mobile-only { display: none; }

/* --- RESPONSIVE MOBILE (Max-Width: 1200px) --- */
@media (max-width: 1200px) {
    body { height: auto; overflow-x: hidden; overflow-y: auto; padding-top: 0; }
    #app-root { display: flex; flex-direction: column; height: auto; overflow: visible; }

    .content-wrapper { flex-direction: column; flex-grow: 1; height: auto; overflow: visible; }
    .sidebar, .right-panel { width: 100%; height: auto; border: none; overflow: visible; }
    .right-panel { display: block; overflow: visible; }
    .sidebar { padding: 30px 20px 56px; }
    .content-wrapper.sidebar-compact-scope--project .sidebar {
        width: calc(100% - (var(--case-page-pad-x) * 2));
        margin: var(--project-top-clearance) auto 0;
        min-height: auto;
        height: auto;
        max-height: none;
        align-self: auto;
        border: none;
        border-radius: 0;
        padding: 0;
        gap: 12px;
    }
    .content-wrapper.sidebar-compact-scope--project .sidebar-top {
        flex: none;
        overflow-y: visible;
        padding: 20px 16px 18px;
        border-radius: 22px;
    }
    .content-wrapper.sidebar-compact-scope--project .sidebar-bottom-block {
        display: none;
    }
    .content-wrapper.sidebar-compact-scope--project .sidebar-scroll-spy {
        padding: 16px 0;
    }

    .sidebar-skills-static {
        gap: 6px;
    }
    .sidebar-skill-chip {
        font-size: 0.5rem;
        padding: 4px 8px;
    }

    .scroll-area { overflow: visible; height: auto; }

    /* About page: body scroll on mobile — reset desktop flex collapse */
    .app-root-about .content-wrapper-fullwidth,
    .app-root-about .right-panel-fullwidth,
    .app-root-home .content-wrapper-fullwidth,
    .app-root-home .right-panel-fullwidth {
        height: auto;
        min-height: 0;
        flex: none;
        overflow: visible;
        display: block;
    }
    .app-root-about .right-panel-fullwidth .scroll-area,
    .app-root-home .right-panel-fullwidth .scroll-area {
        height: auto;
        min-height: auto;
        flex: none;
        overflow: visible;
        display: block;
    }
    .app-root-about .single-page-wrapper {
        min-height: auto;
        display: block;
    }
    .app-root-about .about-page {
        flex: none;
    }

    /* Footer flows normally on mobile */
    .site-footer {
        position: static;
        flex-direction: column-reverse; gap: 8px; text-align: center;
        padding: 12px 20px 16px;
        font-size: 0.65rem;
    }
    .site-footer .footer-copyright {
        font-size: 0.6rem;
        opacity: 0.7;
    }
    .site-footer .socials {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
    }
    /* Hide "Connect with me:" label on mobile */
    .site-footer .connect-label { display: none; }
    /* Icon-only social links on mobile */
    .site-footer .social-link { font-size: 1rem; margin-left: 0; }
    /* Resume button styling on mobile */
    .site-footer .resume-link {
        font-size: 0.7rem;
        padding: 3px 10px;
    }

    .site-footer-shell-green {
        margin-top: 48px;
        margin-bottom: 0;
        background: transparent;
        overflow: visible;
    }
    .site-footer-shell-green .site-footer-monster,
    .site-footer-shell-green .site-contact-band {
        position: relative;
        z-index: 1;
    }
    .single-page-wrapper:has(.site-footer-shell-green) {
        padding-bottom: 0;
    }
    .app-root-home .single-page-wrapper:has(.site-footer-shell) {
        min-height: auto;
        display: block;
    }
    .site-contact-band {
        padding: 32px 20px 32px;
        min-height: auto;
        margin-top: 0;
    }
    .site-contact-inner {
        max-width: 100%;
        gap: 16px;
    }
    .site-contact-layout {
        grid-template-columns: 1fr;
        gap: 28px;
    }
    .site-contact-divider {
        display: none;
    }
    .site-contact-kicker {
        margin-bottom: 18px;
    }
    .site-contact-heading {
        font-size: clamp(2rem, 9vw, 2.75rem);
    }
    .site-contact-col--intro .sidebar-socials {
        margin-top: 24px;
        gap: 6px;
    }
    .site-contact-band .sidebar-social-link:not(.sidebar-resume-link) {
        width: 30px;
        height: 30px;
    }
    .site-contact-band .sidebar-social-link i.fas,
    .site-contact-band .sidebar-social-link i.fab {
        font-size: 13px;
    }
    .site-contact-band .sidebar-resume-link {
        padding: 5px 10px;
        min-height: 30px;
        font-size: 0.65rem;
    }
    .site-contact-lead {
        margin-bottom: 22px;
        font-size: 0.98rem;
    }
    .site-contact-actions {
        gap: 10px;
    }
    .site-contact-btn,
    .site-contact-submit {
        width: 100%;
    }
    .home-about-photo-stickers {
        display: block;
    }
    .site-contact-form {
        max-width: 100%;
        padding: 0;
    }

    .projects-cta {
        padding: 64px 20px 192px;
        margin-top: 24px;
        margin-bottom: 0;
    }

    body { padding-bottom: 0; }

    .home-page-header {
        display: block;
        position: relative;
        padding: 58px 20px 32px;
        min-height: 0;
    }
    .home-page-header .hero-text {
        min-height: 40vh;
        padding: 32px 0 24px;
    }
    .home-page-header-main {
        padding-right: 0;
    }
    .home-hero-greeting-row {
        align-items: flex-start;
        gap: 12px;
        padding-top: 0;
    }
    .home-page-header-aside {
        position: static;
        max-width: none;
        width: 100%;
        margin-top: 16px;
        padding-top: 0;
        align-items: flex-start;
    }
    /* .home-header-tech moved to footer */
    .home-page-header .sidebar-socials {
        gap: 6px;
    }
    .home-hero-actions {
        flex-wrap: wrap;
        margin-top: 24px;
    }
    .home-hero-cta-wrap {
        padding: 16px 0 4px;
    }
    .home-hero-cta-cluster {
        display: inline-block;
    }
    .home-hero-cta-arrow {
        margin-left: 6px;
        width: 72px;
        height: 50px;
    }
    .home-hero-cta-hint {
        font-size: 0.66rem;
    }
    .home-hero-cta {
        min-height: 38px;
        padding: 9px 18px;
        font-size: 0.88rem;
    }
    .home-page-header .sidebar-social-link:not(.sidebar-resume-link) {
        width: 36px;
        height: 36px;
    }
    .home-page-header .sidebar-about-quick-link {
        width: 80px;
        height: 36px;
        min-height: 36px;
        border-radius: 18px;
    }
    .home-page-header .sidebar-social-link i.fas,
    .home-page-header .sidebar-social-link i.fab {
        font-size: 15px;
    }
    .home-page-header .sidebar-resume-link {
        padding: 6px 12px;
        min-height: 36px;
        font-size: 0.72rem;
    }
    .hero-identity-label {
        line-height: 36px;
        min-height: 36px;
        font-size: clamp(1.3rem, 4.8vw, 1.5rem);
    }
    .home-header-composition {
        display: none;
    }

    .project-grid {
        columns: 1;
        column-gap: 0;
        padding: 20px 20px 36px;
    }
    .project-grid .project-card {
        margin-bottom: 24px;
    }
    .home-featured-edge {
        padding: 4px 20px 56px;
    }
    .home-spotlight-card__link {
        grid-template-columns: 1fr;
        min-height: 0;
    }
    .home-spotlight-card__visual {
        aspect-ratio: 1 / 1;
        width: 100%;
    }
    .home-spotlight-card__body {
        padding: 24px 22px 28px;
        border-left: none;
        border-top: 1px solid var(--border-color);
    }
    .home-spotlight-card__stats {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .projects-more {
        width: 100%;
        max-width: none;
        margin: 64px 0 0;
        padding: 20px 0 28px;
    }
    .projects-more-inner {
        padding: 0 20px;
    }
    .projects-more-intro {
        margin-bottom: 10px;
        font-size: 0.9rem;
    }
    .projects-more-row-wrap {
        margin: 4px 0 0;
        padding: 8px 0 16px;
        width: 100vw;
        max-width: 100vw;
        margin-left: calc(50% - 50vw);
    }
    .projects-more-row {
        justify-content: flex-start;
        gap: 20px;
        padding: 16px 24px 24px;
        scroll-snap-type: x proximity;
    }
    .projects-more-row .projects-more-card.projects-more-card--flat {
        margin: 0;
    }
    .projects-more-card--flat {
        scroll-snap-align: center;
    }
    .projects-more-card--flat .projects-more-card-name {
        font-size: 0.78rem;
    }
    .projects-more-card--flat.is-active,
    .projects-more-row .projects-more-card.projects-more-card--flat.is-active {
        transform: rotate(0deg) translateY(-3px);
    }
    .projects-more-board-wrap {
        margin: 4px 0 0;
        padding: 8px 0 16px;
    }
    .projects-more-board-wrap::before {
        width: min(118vw, 980px);
        height: clamp(280px, 72vw, 360px);
        top: 50%;
    }
    .projects-more-board {
        height: clamp(300px, 88vw, 400px);
    }
    .projects-more-card--board {
        width: min(var(--board-width, 140px), 34vw);
    }
    .projects-more-card--board.is-active {
        transform: rotate(0deg) translateY(-6px) scale(1.03);
    }
    .projects-more-card--board .projects-more-card-name {
        font-size: 0.82rem;
    }
    .projects-more-scroll {
        width: 100vw;
        max-width: 100vw;
        margin-left: calc(50% - 50vw);
        padding: 8px 0 12px;
        scroll-padding-inline: 16px;
    }
    .projects-more-scroll::before {
        width: min(118vw, 980px);
        height: clamp(200px, 62vw, 280px);
        top: 44%;
    }
    .projects-more-scroll::after {
        width: min(124vw, 1040px);
        height: clamp(150px, 52vw, 220px);
        top: 6%;
        opacity: 0.72;
    }
    .projects-more-scroll .projects-more-deck--scroll {
        padding-top: 16px;
        padding-left: 16px;
    }
    .projects-more-scroll-hint {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        margin: 0;
        padding: 4px 20px 8px;
        font-size: 0.72rem;
        font-weight: 600;
        color: var(--secondary-text);
        letter-spacing: 0.03em;
    }
    .projects-more-scroll-hint i {
        font-size: 0.65rem;
        opacity: 0.75;
    }
    .projects-more-deck--scroll .projects-more-card {
        flex: 0 0 min(52vw, 196px);
        width: min(52vw, 196px);
        margin: 0 -14px;
    }
    .projects-more-deck--scroll .projects-more-card.is-active {
        margin-left: -10px;
        margin-right: -10px;
        transform: rotate(0deg) translateY(-8px) scale(1.03);
    }
    .projects-more-deck.is-hovering .projects-more-card:not(.is-active) {
        transform: rotate(var(--card-tilt, 0deg)) scale(0.99);
        transition: var(--card-motion, transform 0.82s cubic-bezier(0.22, 1, 0.36, 1));
    }
    .projects-more-card.is-active {
        transform: rotate(0deg) translateY(-8px) scale(1.03);
        transition: var(--card-motion, transform 0.82s cubic-bezier(0.22, 1, 0.36, 1));
    }
    .projects-more-card-frame {
        padding: 9px 9px 13px;
    }
    .projects-more-card-caption {
        min-height: 52px;
        margin-top: 10px;
    }
    .projects-more-card-name {
        font-size: 1rem;
    }
    .projects-more-card-name__underline {
        width: min(100%, 180px);
        height: 7px;
    }
    .home-panel {
        width: 100%;
        max-width: none;
        padding: 20px 16px;
    }
    #home-can-bring.home-can-bring.home-panel {
        margin: 72px 20px;
        padding: 16px 14px 18px;
        width: auto;
        max-width: none;
        box-sizing: border-box;
    }
    #featured-work + #home-can-bring {
        /* Tighter grouping with the featured cards (was 72px) */
        margin-top: 40px;
    }
    #home-can-bring .projects-more-title {
        font-size: clamp(1.5rem, 3vw, 2rem);
        font-weight: 700;
        letter-spacing: -0.02em;
        line-height: 1.2;
    }
    .home-can-bring-scroll-hint {
        display: none;
    }
    .home-can-bring-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .home-can-bring-card {
        padding: 18px 18px 22px;
    }
    .home-can-bring-inner {
        padding-top: 0;
    }
    .home-can-bring-header {
        margin-bottom: 16px;
    }
    /* Hide conversation bubble on mobile — desktop keeps the pinned note. */
    .home-can-bring-ai-note {
        display: none;
    }
    .home-below-projects { padding: 8px 20px 40px; margin-top: 4px; }
    .home-about { margin-top: 96px; }
    .home-about-intro { padding: 24px 20px 72px; }
    .home-about-lead {
        display: flex;
        flex-direction: column;
        gap: 32px;
    }
    .home-about-copy {
        max-width: 420px;
        margin: 0 auto;
        order: 1;
        grid-column: auto;
        grid-row: auto;
        overflow: visible;
    }
    .home-about-note-stickers {
        inset: 0;
    }
    .note-deco-sticker {
        --sticker-size: 46px;
    }
    .note-deco-sticker--heart {
        --sticker-size: 50px;
        top: -16px;
        right: -18px;
    }
    .note-deco-sticker--star {
        --sticker-size: 52px;
        bottom: -14px;
        left: -18px;
    }
    .note-deco-sticker--circle {
        top: -14px;
        left: -16px;
    }
    .home-about-photos {
        order: 2;
        grid-column: auto;
        grid-row: auto;
        width: 100%;
        max-width: 360px;
        min-height: 320px;
        margin: 0 auto;
    }
    .home-about-rest {
        order: 3;
        max-width: none;
        grid-column: auto;
        grid-row: auto;
    }
    .home-about-photo-hero {
        position: absolute;
        right: 8px;
        top: 50%;
        transform: translateY(-50%);
        margin-top: 0;
    }
    .home-about-photo-card--front {
        width: 228px;
        height: 286px;
    }
    .home-about-photo-card--back-a {
        width: 148px;
        height: 186px;
        right: 178px;
        top: 12px;
    }
    .home-about-photo-card--back-b {
        width: 140px;
        height: 176px;
        right: 162px;
        bottom: 8px;
    }
    .home-about-photo-bubble {
        top: -14px;
        right: -4px;
        transform: rotate(5deg);
        font-size: 0.8rem;
        padding: 8px 14px 10px;
    }
    .home-about-career {
        grid-template-columns: 1fr;
        gap: 28px;
        padding: 0 20px 48px;
    }
    .home-about-career .about-exp-group {
        grid-column: auto;
        max-width: none;
    }
    .projects-more-title,
    .home-work-experience .about-section-heading {
        padding: 24px 0 16px;
        font-size: 1.5rem;
    }

    /* Back to top on mobile */
    .back-to-top { bottom: 30px; right: 20px; }

    /* Next projects section on mobile */
    .next-projects-grid { grid-template-columns: 1fr; }
    .next-projects-section { padding: 30px 20px; }

    /* Always show overlay + gradient on next-project cards in mobile */
    .next-project-img::before { opacity: 1; }
    .next-project-img .project-overlay {
        opacity: 1;
        transform: translateY(0);
    }

    .about-intro {
        padding: 28px 20px 16px;
    }
    .about-exp-item {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 16px 4px 18px 18px;
    }
    .about-exp-group--work .about-experience-list,
    .about-exp-group--education .about-experience-list {
        padding-left: 10px;
    }
    .about-exp-group--work .about-exp-item::before,
    .about-exp-group--education .about-exp-item::before {
        left: -10px;
        top: 24px;
    }
    .about-experience {
        grid-template-columns: 1fr;
        gap: 28px;
        margin-bottom: 32px;
    }
    .about-exp-group {
        padding: 0;
    }
    .about-interests {
        margin-bottom: 0;
    }
    .about-interests-list {
        flex-direction: column;
    }
    .about-page {
        padding-top: 0 !important;
    }
    .about-cta {
        width: auto;
        margin: 12px 20px 56px;
    }
    .about-cta__inner {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .about-cta__actions {
        justify-content: flex-start;
    }
    .about-cta__socials {
        gap: 8px;
    }
    .sidebar-about-quick-link__label {
        display: none;
    }
    .about-monster-band .monster-container {
        height: 120px;
    }
    .about-monster-band .monster-body {
        padding-bottom: 25px;
    }

    /* Mobile: show back + visit live site above next projects */
    .mobile-project-actions { display: flex; }

    /* Mobile: hide sidebar back + visit buttons at top */
    .sidebar .back-btn,
    .sidebar .visit-btn {
        display: none;
    }

    /* Mobile: case content padding */
    .case-content { padding: 20px; }

    /* Case hero video: preserve ratio inside 2.63:1 frame */
    .case-hero-img.case-hero-video {
        padding: 0;
        background: #0a0a0a;
    }
    .case-hero-img.case-hero-video video {
        width: 100%;
        height: 100%;
        object-fit: contain !important;
        object-position: center center;
    }

    /* Preserve video aspect ratios on project pages */
    .single-page-wrapper .case-section video {
        object-fit: contain;
        max-width: 100%;
    }
    .p2s-overview-hero-stage .p2s-phone-frame--device,
    .p2s-impact-demo-stage .p2s-phone-frame--device,
    .case-section .p2s-grid-2.p2s-solution-row--phone-stage .p2s-phone-frame--device {
        aspect-ratio: 9 / 19.5;
        align-self: center;
        height: auto;
        width: min(38%, 148px);
        max-width: min(38%, 148px);
        max-height: min(46vw, 260px);
    }
    .p2s-solution-row--phone-stage .p2s-phone-frame--device video,
    .p2s-solution-row--phone-stage .p2s-phone-frame--device img,
    .p2s-impact-demo-stage .p2s-phone-frame--device video {
        width: 100%;
        height: auto;
        max-height: none;
        object-fit: contain;
    }

    /* Overview hero blocks: spacing comes from .case-section like other sections */
    .p2s-overview-hero-inner,
    .case-overview-hero-inner,
    .lt-overview-hero-inner,
    .lcm-overview-inner {
        padding-left: 0;
        padding-right: 0;
        box-sizing: border-box;
    }

    .content-wrapper.sidebar-compact-scope--project .case-overview-hero-text,
    .content-wrapper.sidebar-compact-scope--project .p2s-overview-hero-text {
        padding: 0;
    }

    /* Project list: square thumbnails on mobile (video cards stay 12:9) */
    .project-grid .project-card .image-container,
    .project-grid .project-card:nth-child(n) .image-container:not(.image-container--video) {
        aspect-ratio: 1 / 1;
    }
    .project-grid .project-card .image-container.image-container--video {
        aspect-ratio: 12 / 9;
    }
    .project-grid .project-card .image-container.image-container--video video {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center center;
    }

    .case-hero-meta {
        padding: 0;
    }
    .case-hero-meta-inner,
    .case-hero-meta-inner--cols-1,
    .case-hero-meta-inner--cols-2,
    .case-hero-meta-inner--cols-2:has(.case-hero-meta-item--tools):has(.case-hero-meta-item--team),
    .case-hero-meta-inner--cols-3,
    .content-wrapper.sidebar-compact-scope--project .case-hero-meta-inner,
    .content-wrapper.sidebar-compact-scope--project .case-hero-meta-inner--cols-2,
    .content-wrapper.sidebar-compact-scope--project .case-hero-meta-inner--cols-2:has(.case-hero-meta-item--timeline),
    .content-wrapper.sidebar-compact-scope--project .case-hero-meta-inner--cols-2:has(.case-hero-meta-item--tools):has(.case-hero-meta-item--team),
    .content-wrapper.sidebar-compact-scope--project .case-hero-meta-inner--cols-2:has(.case-hero-meta-item--timeline):has(.case-hero-meta-item--team):not(:has(.case-hero-meta-item--tools)),
    .content-wrapper.sidebar-compact-scope--project .case-hero-meta-inner--cols-3 {
        grid-template-columns: minmax(0, 1fr) !important;
    }
    .case-hero-meta-item {
        padding: 16px 20px;
    }
    .case-hero-meta-item + .case-hero-meta-item {
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.28);
    }

    .content-wrapper.sidebar-compact-scope--project {
        --case-page-pad-x: 20px;
        gap: 0;
    }

    .content-wrapper.sidebar-compact-scope--project .case-section {
        padding-left: var(--case-page-pad-x);
    }

    .content-wrapper.sidebar-compact-scope--project .case-hero {
        padding: var(--project-top-clearance) var(--case-page-pad-x) 0;
    }

    .content-wrapper.sidebar-compact-scope--project .next-projects-section {
        padding: 40px var(--case-page-pad-x);
    }

    .content-wrapper.sidebar-compact-scope--project .case-hero-img {
        border-radius: 12px;
    }

    .content-wrapper.sidebar-compact-scope--project .case-hero-img.case-hero-video {
        border-radius: 8px;
    }

    .content-wrapper.sidebar-compact-scope--project .p2s-overview-parallax-wrap {
        margin: 0;
        border-radius: 12px;
    }

    .content-wrapper.sidebar-compact-scope--project .p2s-parallax-wrap {
        margin: 0;
        border-radius: 12px;
    }

    .content-wrapper.sidebar-compact-scope--project .case-hero-meta {
        padding: 14px 20px 2px;
    }

    .content-wrapper.sidebar-compact-scope--project .case-hero-meta-inner {
        gap: 0;
        align-items: stretch;
    }

    .content-wrapper.sidebar-compact-scope--project .case-hero-meta-item {
        padding: 0;
        align-items: start;
        text-align: left;
    }

    .content-wrapper.sidebar-compact-scope--project .case-hero-meta-item:not(:last-child) {
        padding-right: 0;
    }

    .content-wrapper.sidebar-compact-scope--project .case-hero-meta-item + .case-hero-meta-item {
        border-left: none;
        border-top: 1px solid var(--border-color);
        padding-left: 0;
        padding-top: 14px;
        margin-top: 14px;
    }

    .sidebar-scroll-spy {
        display: none !important;
    }

    /* Mobile: show about back-to-home link */
    .about-home-link-mobile-only { display: inline-flex; }

    /* Mobile: show playground back-to-home button */
    .back-btn-mobile-only { display: inline-flex; }
}

/* --- MOBILE SIDEBAR RE-ASSERTION --- */
@media (max-width: 1200px) {
    .sidebar {
        width: 100% !important;
        height: auto !important;
        overflow: visible !important;
        padding: 30px 20px 0 20px !important;
        min-height: auto;
        border-right: none !important;
    }
}

/* The pinned can-bring panel anchors the speech bubble at its top-right corner. */
.home-can-bring-panel { position: relative; }

/* ===== Home scroll scenes (desktop): pin "What can I bring" + flip cards ===== */
@media (min-width: 1201px) and (prefers-reduced-motion: no-preference) {
    html.home-scroll-scenes .home-scroll-pin-block {
        position: relative;
        flex: 0 0 auto;
        height: calc(var(--pin-steps, 1) * 100vh);
        height: calc(var(--pin-steps, 1) * 100dvh);
        min-height: calc(var(--pin-steps, 1) * 100vh);
        min-height: calc(var(--pin-steps, 1) * 100dvh);
        margin: 0 auto;
        padding: 0 30px;
        box-sizing: border-box;
    }

    html.home-scroll-scenes .home-scroll-pin-block--featured {
        max-width: 1280px;
        width: 100%;
        padding-bottom: 0;
        margin-bottom: 12vh;
    }

    html.home-scroll-scenes .home-scroll-pin-block--can-bring {
        max-width: 1280px;
        width: 100%;
        padding: 0 30px;
        /* Tighter lead-in so the pinned can-bring scene feels connected to the
           featured cards above (was clamp(96px, 14vh, 168px) top). */
        margin: clamp(28px, 4vh, 56px) auto 12vh;
    }

    html.home-scroll-scenes .home-scroll-pin {
        position: sticky;
        top: 0;
        height: 100vh;
        height: 100dvh;
        display: flex;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
        padding: 72px 0 24px;
    }

    html.home-scroll-scenes .home-scroll-pin--can-bring {
        flex-direction: column;
        justify-content: center;
        gap: 0;
    }

    html.home-scroll-scenes .home-scroll-pin--can-bring .home-can-bring-inner {
        width: 100%;
        max-width: none;
        margin: 0 auto;
    }

    html.home-scroll-scenes .home-scroll-pin--can-bring .home-panel,
    html.home-scroll-scenes .home-scroll-pin--can-bring .home-can-bring-panel {
        width: min(100%, 800px);
        max-width: 800px;
        margin-left: auto;
        margin-right: auto;
    }

    html.home-scroll-scenes .home-scroll-pin--can-bring .home-panel {
        position: relative;
        opacity: 1;
        transform: none;
    }
    html.home-scroll-scenes .home-scroll-pin--can-bring .home-can-bring-ai-note {
        position: absolute;
        top: -30px;
        right: 24px;
        left: auto;
        margin: 0;
        max-width: min(320px, calc(100% - 60px));
        transform: rotate(2deg);
    }

    html.home-scroll-scenes .stack-deck--scene {
        position: relative;
        width: min(100%, 800px);
        max-width: 800px;
        margin: 0 auto;
        padding: 0;
        min-height: clamp(320px, 42vh, 420px);
    }

    html.home-scroll-scenes .stack-deck--scene .stack-card {
        position: absolute;
        inset: 0;
        width: 100%;
        margin: 0 !important;
        top: 0;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: none !important;
        filter: none !important;
        transition: opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.4s;
    }

    html.home-scroll-scenes .stack-deck--scene .stack-card.is-scene-active {
        position: relative;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    html.home-scroll-scenes .home-scroll-scene--about-intro,
    html.home-scroll-scenes .home-scroll-scene--about-rest,
    html.home-scroll-scenes .home-scroll-scene--footer {
        height: 100vh;
        height: 100dvh;
        min-height: 100vh;
        min-height: 100dvh;
        scroll-snap-align: start;
        scroll-snap-stop: always;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    html.home-scroll-scenes .home-scroll-scene--about-intro {
        margin-top: 0;
        padding-top: 72px;
        padding-bottom: 24px;
    }

    html.home-scroll-scenes .home-scroll-scene--about-rest {
        margin-top: 0;
        padding-top: 72px;
        padding-bottom: 24px;
        justify-content: flex-start;
        overflow-y: auto;
    }

    html.home-scroll-scenes .home-scroll-scene--footer {
        justify-content: flex-end;
        padding-bottom: 0;
    }

    html.home-scroll-scenes .home-scroll-scene--footer .site-footer-monster {
        margin-top: auto;
    }

    html.home-scroll-scenes #home-can-bring.home-scroll-pin-block--can-bring {
        margin: clamp(96px, 14vh, 168px) auto 12vh;
    }
}

/* Project pages — typography cap (nothing above semibold / 600) */
.content-wrapper.sidebar-compact-scope--project .right-panel [class],
.content-wrapper.sidebar-compact-scope--project .sidebar [class],
.content-wrapper.sidebar-compact-scope--project .case-hero [class] {
    font-weight: 600 !important;
}

.content-wrapper.sidebar-compact-scope--project :is(
    h1, h2, h3, h4, h5, h6,
    strong, b, th
) {
    font-weight: 600 !important;
}

.content-wrapper.sidebar-compact-scope--project .case-section ol li::marker,
.content-wrapper.sidebar-compact-scope--project .case-section ul li::marker,
.content-wrapper.sidebar-compact-scope--project .case-content ol li::marker {
    font-weight: 600 !important;
}

.content-wrapper.sidebar-compact-scope--project .right-panel :is(
    p, li, blockquote, figcaption, td, dd, dt,
    .case-phase-body, .case-section p, .case-section li,
    .case-section-intro, .sidebar-intro
) {
    font-weight: 400 !important;
}

.content-wrapper.sidebar-compact-scope--project .sidebar :is(
    p, li, .sidebar-intro, .sidebar-meta-value
) {
    font-weight: 400 !important;
}

.content-wrapper.sidebar-compact-scope--project .case-hero :is(
    .case-hero-meta-value,
    .case-hero-meta-tools,
    .case-hero-meta-list,
    .case-hero-meta-list li
) {
    font-weight: 400 !important;
}

.content-wrapper.sidebar-compact-scope--project .sidebar-scroll-spy-link:not(.is-active) {
    font-weight: 400 !important;
}


/* =========================================================
   ACCESSIBILITY: SKIP LINK + GLOBAL FOCUS INDICATORS
   ========================================================= */

/* Skip to main content — first focusable element on every page (WCAG 2.4.1).
   Visually hidden until keyboard focus slides it in. */
.skip-link {
    position: fixed;
    top: 14px;
    left: 14px;
    z-index: 100001;
    padding: 10px 18px;
    background: var(--accent-color);
    color: #111111;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    border-radius: 999px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
    transform: translateY(calc(-100% - 20px));
}
.skip-link:focus {
    transform: translateY(0);
}
@media (prefers-reduced-motion: no-preference) {
    .skip-link { transition: transform 0.15s ease; }
}

/* The skip-link target should not show a ring of its own when it receives
   programmatic focus. */
#main-content:focus {
    outline: none;
}

/* Global keyboard focus indicator (WCAG 2.4.7): one consistent 3px green
   ring for every interactive element. Declared last with !important so the
   scattered `outline: none` resets (kept for mouse users — :focus-visible
   does not match mouse focus) can never remove the keyboard indicator. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible,
audio:focus-visible,
video:focus-visible,
iframe:focus-visible,
[tabindex]:not([tabindex="-1"]):focus-visible {
    outline: 3px solid var(--accent-color) !important;
    outline-offset: 3px;
}

/* On green surfaces the green ring would disappear — switch it to the
   near-black those sections already use for text (≥3:1 against var(--brand)). */
.site-footer-green a:focus-visible,
.site-footer-green button:focus-visible,
.site-contact-band a:focus-visible,
.site-contact-band button:focus-visible,
.site-contact-band input:focus-visible,
.site-contact-band textarea:focus-visible,
.skip-link:focus-visible {
    outline-color: #111111 !important;
}
