/* Pecita font moved to HTML <link> for non-render-blocking load */

:root {
    --bg: #e6e6e600;
    --text: #313131;
    --accent: #666;
    --cursor: #b3b3b3;
    --font-main: 'Ysabeau Infant', 'Ysabeau', sans-serif;
    --font-flex: 'Ysabeau Infant', 'Ysabeau', sans-serif;
    --scroll-track: #313131;
    --scroll-thumb: #313131;
    --scroll-thumb-alt: #e6e6e6;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    cursor: none !important; /* Hide default cursor */
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-main);
    font-optical-sizing: auto;
    font-variation-settings: 'wght' 430;
    overflow-x: hidden;
    transition: background-color 0.5s ease, color 0.5s ease;
}

/* Temporary white mask to hide base page while launch/modal UI is active */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    opacity: 0;
    pointer-events: none;
    z-index: 980;
    transition: opacity 0.25s ease;
}

body.launching-active::before,
body.modal-open::before {
    opacity: 1;
}

body.launching-active::after,
body.modal-open::after {
    opacity: 0;
}

body.launching-active .grain-overlay,
body.modal-open .grain-overlay {
    opacity: 0;
}

body.launching-active,
body.modal-open {
    background-color: #ffffff !important;
}

/* Hide only base index layers, keep functional overlays/buttons untouched */
body.launching-active #smooth-wrapper,
body.launching-active .fixed-nav,
body.launching-active #rex-bg,
body.modal-open #smooth-wrapper,
body.modal-open .fixed-nav,
body.modal-open #rex-bg {
    visibility: hidden !important;
}

html {
    overflow-x: hidden;
    background: #111111;
}

html.copy-protection-enabled,
html.copy-protection-enabled * {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

html.copy-protection-enabled img,
html.copy-protection-enabled video,
html.copy-protection-enabled canvas,
html.copy-protection-enabled svg {
    -webkit-touch-callout: none;
    -webkit-user-drag: none;
    user-drag: none;
}

/* Launching page overlay (restored) */
#launching-page {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100vh;
    height: -webkit-fill-available;
    height: 100dvh;
    z-index: 1200;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: #ffffff;
    color: #313131;
    transition: opacity 0.5s ease-out;
    opacity: 1;
    pointer-events: auto;
    overscroll-behavior: none; /* Prevent rubber-banding revealing the background */
    touch-action: none; /* Prevent scroll on mobile while loading */
}

/* Safari bounce/rubber-banding safeguard */
#launching-page::before {
    content: "";
    position: absolute;
    top: -50vh;
    left: -50vw;
    right: -50vw;
    bottom: -50vh;
    background: #ffffff;
    z-index: -100;
    pointer-events: none;
}

#launching-page.hidden {
    opacity: 0;
    pointer-events: none;
}

.launching-nav {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    z-index: 10;
    pointer-events: none;
    color: #313131;
}

.launching-nav-brand {
    font-family: var(--font-flex);
    font-weight: 800;
    font-variation-settings: 'wdth' 100, 'wght' 800;
    font-size: 1.5rem;
    color: inherit;
    display: inline-block;
}

.launching-nav-role {
    text-align: right;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.4;
}

@media (max-width: 768px) {
    .launching-nav {
        padding: 1rem;
    }

    .launching-nav-brand {
        font-size: 1.1rem;
    }

    .launching-nav-role {
        font-size: 0.75rem;
        line-height: 1.35;
        max-width: 40vw;
        word-break: break-word;
    }
}

#launching-page canvas {
    width: 100%;
    height: 100%;
    display: block;
}

#launching-page,
#launching-page *,
#launching-page canvas,
#launching-page canvas.hoverable {
    cursor: none !important;
}

.panel {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.full-height {
    height: 100vh;
    height: -webkit-fill-available;
    height: 100dvh;
}

html.modal-open,
body.modal-open {
    overflow: hidden;
}

html.modal-open::-webkit-scrollbar,
body.modal-open::-webkit-scrollbar {
    width: 0;
}

a {
    text-decoration: none;
    color: inherit;
}

/* --- Sculpted Scrollbars (global + modal) --- */
html,
body,
.modal-scroll-container,
.modal-content {
    scrollbar-width: thin;
    scrollbar-color: var(--scroll-thumb) var(--scroll-track);
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
.modal-scroll-container::-webkit-scrollbar,
.modal-content::-webkit-scrollbar {
    width: 10px;
    background: transparent;
}

html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track,
.modal-scroll-container::-webkit-scrollbar-track,
.modal-content::-webkit-scrollbar-track {
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, var(--scroll-track) 25%, var(--scroll-track) 75%, rgba(0,0,0,0) 100%);
}

html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb,
.modal-scroll-container::-webkit-scrollbar-thumb,
.modal-content::-webkit-scrollbar-thumb {
    background: linear-gradient(120deg, var(--scroll-thumb) 0%, #444 40%, #000 100%);
    border: 2px solid rgba(255,255,255,0.4);
    border-radius: 99px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

html::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover,
.modal-scroll-container::-webkit-scrollbar-thumb:hover,
.modal-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(120deg, #000 0%, #222 50%, #000 100%);
}

/* --- Realistic Film Grain (GPU-optimized) --- */
.grain-overlay {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.06;
    pointer-events: none;
    z-index: 9999;
    animation: grain-animation 0.6s steps(6) infinite;
    mix-blend-mode: soft-light;
    will-change: transform;
    contain: strict;
    backface-visibility: hidden;
}

@keyframes grain-animation {
    0% { transform: translate3d(0, 0, 0); }
    10% { transform: translate3d(-5%, -5%, 0); }
    20% { transform: translate3d(-10%, 5%, 0); }
    30% { transform: translate3d(5%, -10%, 0); }
    40% { transform: translate3d(-5%, 15%, 0); }
    50% { transform: translate3d(-10%, -5%, 0); }
    60% { transform: translate3d(15%, 0, 0); }
    70% { transform: translate3d(0, 10%, 0); }
    80% { transform: translate3d(-15%, 0, 0); }
    90% { transform: translate3d(10%, 5%, 0); }
    100% { transform: translate3d(5%, 0, 0); }
}

/* --- Custom Cursor --- */
#cursor {
    position: fixed;
    top: 0; left: 0;
    width: 30px; height: 30px;
    border: 5px solid var(--cursor);
    border-radius: 50%;
    pointer-events: none;
    z-index: 999999;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, background-color 0.3s;
    mix-blend-mode: difference;
}

#cursor.hovered {
    width: 80px; height: 80px;
    background-color: var(--cursor);
    border-color: transparent;
}

#cursor.cursor-has-text {
    width: 170px;
    height: 170px;
    background-color: rgba(179, 179, 179, 0.88);
}

#cursor .cursor-hover-text {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 132px;
    text-align: center;
    font-family: "Ysabeau Infant", "Ysabeau", sans-serif;
    font-size: 0.86rem;
    line-height: 1.15;
    letter-spacing: 0.08em;
    font-weight: 700;
    color: #313131;
    text-transform: uppercase;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

#cursor.cursor-has-text .cursor-hover-text {
    opacity: 1;
}

/* --- Cursor Progress Indicator --- */
.cursor-progress {
    position: absolute;
    top: -5px;
    left: -5px;
    width: calc(100% + 10px);
    height: calc(100% + 10px);
    transform: rotate(-90deg);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.cursor-progress circle {
    fill: none;
    stroke-width: 6;
}

.progress-bg {
    stroke: rgba(255, 255, 255, 0.2);
}

.progress-bar {
    stroke: #fff;
    stroke-dasharray: 283; /* 2 * PI * 45 */
    stroke-dashoffset: 283;
}

#cursor.holding .cursor-progress {
    opacity: 1;
}

/* --- Navigation --- */
.fixed-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    z-index: 100;
    mix-blend-mode: normal;
    color: inherit;
}

.brand {
    font-family: var(--font-flex);
    font-weight: 800;
    font-variation-settings: 'wdth' 100, 'wght' 800;
    font-size: 1.5rem;
    text-decoration: none;
    color: inherit;
    display: inline-block;
    transition: font-variation-settings 0.3s ease;
}

.brand-typed-word {
    display: inline-block;
    color: #a6a6a6;
    opacity: 1;
}

.brand-cursor {
    display: inline-block;
    width: 0.45ch;
    margin-left: 0;
    vertical-align: baseline;
    color: #8a6f00;
    opacity: 1;
}

.fixed-nav.is-on-dark .brand-typed-word,
.fixed-nav.is-on-dark .brand-cursor {
    color: #f7e99f;
    opacity: 1;
}

.fixed-nav.is-on-footer .brand-typed-word {
    color: #313131;
}

@keyframes brandCursorBlink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.brand:hover {
    font-variation-settings: 'wdth' 120, 'wght' 900;
}

.role {
    text-align: right;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.4;
}

/* --- Hero Section --- */
.hero-section {
    height: 100vh;
    height: -webkit-fill-available;
    height: 100dvh;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem;
    position: relative;
    overflow: visible;
}

#hero-3d-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
    pointer-events: none;
}

.hero-content * {
    pointer-events: auto;
}

.hero-content h1 {
    font-family: var(--font-flex);
    font-size: 8vw;
    font-weight: 800;
    font-variation-settings: 'wdth' 100;
    line-height: 0.9;
    letter-spacing: -0.03em;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%);
    transition: font-variation-settings 0.5s ease;
}

.hero-content h1:hover {
    font-variation-settings: 'wdth' 110;
}

.hero-rive-container {
    position: absolute;
    inset: -18vh -14vw;
    z-index: 1;
    pointer-events: none;
    overflow: visible;
}

#hero-rive-canvas {
    width: 100%;
    height: 100%;
    max-width: none;
    display: block;
}

.hero-sub {
    font-size: 1.5rem;
    margin-top: 2rem;
    color: var(--accent);
}

@media (max-width: 768px) {
    .fixed-nav {
        padding: 1rem;
        gap: 0.75rem;
    }

    .brand {
        font-size: 1.1rem;
        max-width: 55vw;
        overflow-wrap: anywhere;
    }

    .role {
        font-size: 0.75rem;
        line-height: 1.35;
        max-width: 40vw;
        overflow-wrap: anywhere;
        word-break: break-word;
    }
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 2rem;
    font-size: 0.9rem;
    opacity: 0.6;
}

.hero-audio-panel {
    position: absolute;
    right: 2rem;
    bottom: 2rem;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 2.35rem;
    padding: 0;
    color: #313131;
    font-family: var(--font-main);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero-audio-power,
.hero-audio-mode {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #111111;
    background: rgba(255, 255, 255, 0.78);
    color: #313131;
    font: inherit;
    letter-spacing: inherit;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), background 0.2s ease, color 0.2s ease;
}

.hero-audio-power {
    width: 2.35rem;
    height: 2.35rem;
    font-size: 0.72rem;
}

.hero-audio-power__icon {
    transform: translateX(0.04rem);
}

.hero-audio-power[aria-pressed="true"] .hero-audio-power__icon {
    transform: none;
}

.hero-audio-modes {
    display: inline-flex;
    align-items: center;
    gap: 0;
    max-width: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateX(-0.35rem);
    transition: max-width 0.28s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.18s ease, transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-audio-panel.is-expanded .hero-audio-modes {
    max-width: 12rem;
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
}

.hero-audio-mode {
    min-width: 3.55rem;
    height: 2.35rem;
    gap: 0.34rem;
    padding: 0 0.62rem;
    border: 1px solid #111111;
    border-left: 0;
    background: rgba(255, 255, 255, 0.78);
    color: #313131;
    opacity: 0.45;
}

.hero-audio-mode:first-child {
    border-left: 1px solid #111111;
}

.hero-audio-mode__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0.72rem;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1;
}

.hero-audio-mode__label {
    font-size: 0.62rem;
    line-height: 1;
}

.hero-audio-mode:hover,
.hero-audio-mode:focus-visible {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.9);
    color: #313131;
}

.hero-audio-power:hover,
.hero-audio-power:focus-visible {
    transform: translateY(-1px);
    background: #111111;
    color: #ffffff;
}

.hero-audio-power:focus-visible,
.hero-audio-mode:focus-visible,
.hero-audio-volume__range:focus-visible {
    outline: 1px solid #111111;
    outline-offset: 3px;
}

.hero-audio-mode[aria-pressed="true"] {
    color: #313131;
    background: rgba(255, 255, 255, 0.9);
    opacity: 1;
}

.hero-audio-power[aria-pressed="true"] {
    color: #ffffff;
    background: #111111;
}

.hero-audio-volume {
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    min-width: 0;
    height: 2.35rem;
    padding: 0;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.78);
    color: #313131;
    max-width: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateX(-0.35rem);
    transition: max-width 0.28s cubic-bezier(0.22, 1, 0.36, 1), padding 0.28s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.18s ease, transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-audio-panel.is-expanded .hero-audio-volume {
    max-width: 6.6rem;
    min-width: 6.6rem;
    padding: 0 0.8rem 0 0.65rem;
    border-color: #111111;
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
}

.hero-audio-volume__icon {
    font-size: 0.76rem;
    letter-spacing: 0;
    line-height: 1;
}

.hero-audio-volume__range {
    width: 3.85rem;
    accent-color: #111111;
    cursor: pointer;
}

@media (max-width: 768px) {
    .hero-audio-panel {
        right: 1rem;
        bottom: 1rem;
        gap: 0.5rem;
    }

    .hero-audio-power {
        width: 2.2rem;
        height: 2.2rem;
    }

    .hero-audio-mode {
        min-width: 2.2rem;
        height: 2.2rem;
        padding: 0;
    }

    .hero-audio-mode__label {
        display: none;
    }

    .hero-audio-volume {
        height: 2.2rem;
    }

    .hero-audio-panel.is-expanded .hero-audio-volume {
        max-width: 5rem;
        min-width: 5rem;
        padding: 0 0.68rem 0 0.48rem;
    }

    .hero-audio-volume__range {
        width: 2.85rem;
    }
}

/* --- Hero Floating Poem --- */
/* 6 independent elements scattered across the hero a�ᡨ no wrapper, no box */
.poem-fragment {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;
    cursor: default;
    user-select: none;
    will-change: transform;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    /* vertical-rl for ZH (set inline by JS), horizontal-tb for EN */
}

.poem-fragment.pf-decoding {
    opacity: 0.28;
}

.poem-fragment.pf-decoded {
    opacity: 0.32;
}

.poem-fragment:hover {
    opacity: 0.72 !important;
    transition: opacity 0.2s ease;
}

.poem-char {
    display: inline;
    font-family: var(--font-flex);
    font-size: clamp(0.52rem, 0.9vw, 0.68rem);
    font-weight: 200;
    letter-spacing: 0.04em;
    line-height: 1.7;
    color: var(--text);
}

.poem-fragment.pf-decoding .poem-char {
    color: var(--accent, #999);
}

/* --- Horizontal Section --- */
.horizontal-section {
    width: 100%;
    height: 100vh; /* Needed for pinning */
    overflow: hidden;
    display: flex;
    align-items: center;
    background-color: var(--bg); /* Ensure initial background matches body */
    position: relative;
    isolation: isolate;
    --horizontal-energy: 0;
    --horizontal-progress: 0;
}

.horizontal-section::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -3;
    pointer-events: none;
    background:
        linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
    background-size: 8vw 8vw;
    opacity: calc(0.18 + (var(--horizontal-energy) * 0.16));
    transform: translate3d(calc(var(--horizontal-progress) * -2vw), 0, 0);
}

.horizontal-section::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background:
        linear-gradient(90deg, transparent 0 9.8vw, rgba(255, 255, 255, 0.055) 10vw, transparent 10.2vw),
        linear-gradient(180deg, transparent 0 18vh, rgba(255, 255, 255, 0.045) 18.2vh, transparent 18.4vh);
    background-size: 20vw 100%, 100% 36vh;
    opacity: calc(0.42 + (var(--horizontal-energy) * 0.12));
}

.horizontal-layout-system {
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.layout-line,
.layout-column,
.layout-cross {
    position: absolute;
    background: rgba(230, 230, 230, 0.16);
}

.layout-line {
    left: 5vw;
    right: 5vw;
    height: 1px;
    transform: translateX(calc(var(--horizontal-progress) * -5vw));
}

.layout-line-top {
    top: 13vh;
}

.layout-line-mid {
    top: 50%;
    opacity: 0.55;
}

.layout-line-bottom {
    bottom: 13vh;
}

.layout-column {
    top: 9vh;
    bottom: 9vh;
    width: 1px;
    transform: translateX(calc(var(--horizontal-progress) * 6vw));
}

.layout-column-left {
    left: 18vw;
}

.layout-column-center {
    left: 50vw;
    opacity: 0.52;
}

.layout-column-right {
    right: 18vw;
}

.layout-cross {
    width: clamp(3rem, 7vw, 5.5rem);
    height: clamp(3rem, 7vw, 5.5rem);
    background: transparent;
    opacity: calc(0.42 + (var(--horizontal-energy) * 0.18));
    transform: translateX(calc(var(--horizontal-progress) * 10vw));
}

.layout-cross::before,
.layout-cross::after {
    content: "";
    position: absolute;
    background: rgba(230, 230, 230, 0.28);
}

.layout-cross::before {
    left: 50%;
    top: 0;
    bottom: 0;
    width: 1px;
}

.layout-cross::after {
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
}

.layout-cross-left {
    left: 7vw;
    bottom: 19vh;
}

.layout-cross-right {
    right: 8vw;
    top: 18vh;
    transform: translateX(calc(var(--horizontal-progress) * -8vw));
}

.horizontal-wrapper {
    display: flex;
    gap: 5vw;
    padding: 0 10vw;
    width: max-content; /* Important for horizontal calculation */
    align-items: center;
    will-change: transform;
    backface-visibility: hidden;
    position: relative;
    z-index: 2;
}

.card {
    width: 35vw;
    height: 55vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-shrink: 0;
    position: relative;
    perspective: 1000px;
    transform-style: preserve-3d;
}

@media (max-width: 768px) {
    .card {
        width: 85vw;
        height: 65vh;
    }
}

.text-card {
    justify-content: center;
    width: 30vw;
    min-width: 22rem;
}

.text-card h2 {
    font-family: var(--font-flex);
    font-size: 5vw;
    line-height: 1;
    font-variation-settings: 'wdth' 100;
    text-transform: uppercase;
}

.text-card p {
    max-width: 18rem;
    margin-top: 1.1rem;
    font-size: clamp(0.85rem, 1vw, 1rem);
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

@media (max-width: 768px) {
    .text-card {
        width: 80vw;
    }
    
    .text-card h2 {
        font-size: 14vw;
    }

    .coming-soon-line {
        font-size: clamp(1rem, 7vw, 2rem);
    }
}

.more-link {
    cursor: pointer;
    display: inline-block;
    text-decoration: none;
    letter-spacing: 0.06em;
}

/* Keep contact-link underline on more-link */
.more-link.contact-link::after {
    height: 2px;
    background-color: currentColor;
}

/* Block wrappers so More and Coming Soon always left-align together */
.more-line,
.coming-soon-line {
    display: block;
}

.coming-soon-line {
    margin-top: 0.28em;
    font-size: clamp(1.1rem, 2vw, 2.2rem);
    line-height: 1.05;
    letter-spacing: 0.04em;
    opacity: 0.58;
}

/* Cancel the magnetic-wrap's left padding so More aligns with Coming Soon */
.more-line > .magnetic-wrap {
    padding-left: 0;
    margin-left: 0;
}

/* On touch/mobile: always show underline so More is clearly tappable */
@media (hover: none), (max-width: 768px) {
    .more-link.contact-link::after {
        transform: scaleX(1);
        transform-origin: bottom left;
    }
}

.project-card {
    cursor: pointer;
    transform-origin: center center;
    will-change: transform, opacity, filter;
}

.project-card .card-inner {
    width: 100%;
    height: 100%;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2); /* Subtle border */
    border-radius: 0;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.45s ease;
    box-shadow: 0 1rem 5rem rgba(0, 0, 0, 0.16);
    transform-style: preserve-3d;
}

.project-card:hover .card-inner {
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 2rem 7rem rgba(0, 0, 0, 0.48);
    transform: translateZ(36px);
}

.visual-placeholder {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 1;
    transition: transform 0.6s ease, filter 0.4s ease, opacity 0.4s ease;
    transform: scale(1);
    filter: grayscale(100%) brightness(0.52) contrast(1.1); /* Darkened for text readability */
    z-index: 0;
}

.project-card .card-inner::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.78), transparent 58%);
    opacity: 0;
    transition: opacity 0.35s ease;
}

.project-card .card-inner::after {
    content: "";
    position: absolute;
    inset: 0.8rem;
    z-index: 2;
    pointer-events: none;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 0;
    opacity: 0;
    transform: scale(0.96);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.visual-placeholder-media {
    object-fit: cover;
    object-position: center;
    background: #101010;
}

.project-card:hover .visual-placeholder,
.project-card.mobile-active .visual-placeholder {
    transform: scale(1.09);
    filter: grayscale(0%) brightness(1) contrast(1.04);
}

.project-card:hover .card-inner::before,
.project-card.mobile-active .card-inner::before,
.project-card:hover .card-inner::after,
.project-card.mobile-active .card-inner::after {
    opacity: 1;
}

.project-card:hover .card-inner::after,
.project-card.mobile-active .card-inner::after {
    transform: scale(1);
}

.card-content-overlay {
    position: relative;
    z-index: 3;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: inherit; /* Inherit from body/section */
    transform: none;
    opacity: 1;
    background: none;
    padding: 0;
}

.card-num {
    font-family: monospace;
    font-size: 1.2rem;
    font-weight: 400;
    opacity: 0.5;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: rgba(255, 255, 255, 0.78);
}

.card-num::after {
    content: "";
    width: 4.8rem;
    height: 1px;
    background: currentColor;
    transform-origin: left center;
    transform: scaleX(calc(0.35 + (var(--card-focus, 0) * 0.65)));
}

.project-card .card-title {
    font-family: var(--font-flex);
    font-size: clamp(2rem, 3vw, 4.6rem);
    font-weight: 800;
    font-variation-settings: 'wdth' 100, 'wght' 800;
    line-height: 0.9;
    text-transform: uppercase;
    transition: font-variation-settings 0.4s ease, color 0.4s ease;
    text-shadow: 0 2px 20px rgba(0,0,0,0.5); /* Ensure readability */
    transform: translateY(calc((1 - var(--card-focus, 0)) * 0.75rem));
}

@media (max-width: 768px) {
    .project-card .card-title {
        font-size: clamp(2.5rem, 8.2vw, 4.8rem);
    }
}

.project-card:hover .card-title,
.project-card.mobile-active .card-title {
    font-variation-settings: 'wdth' 125, 'wght' 900;
    color: #fff; /* Ensure visibility over image */
    -webkit-text-stroke: 1px transparent;
}

/* Invert text color on hover if background is light, but here we assume dark section */
.horizontal-section[data-bgcolor="#111111"] .project-card:hover .card-title,
.horizontal-section[data-bgcolor="#111111"] .project-card.mobile-active .card-title {
    color: #fff;
}

/* Add a "view" indicator */
.card-action {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    color: #fff;
    font-family: monospace;
}

.project-card:hover .card-action,
.project-card.mobile-active .card-action {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .project-card,
    .layout-line,
    .layout-column,
    .layout-cross {
        transform: none !important;
    }
}

/* ============================================
   EXPERIMENTAL PHILOSOPHICAL FOOTER
   Storytelling Scroll Design System
   ============================================ */

/* --- Footer Story Container --- */
.footer-story {
    min-height: auto !important;
    padding: 0 !important;
    background: transparent !important;
    position: relative;
    overflow: visible;
    content-visibility: auto;
    contain-intrinsic-size: auto 500vh;
}

.footer-story::before {
    display: none;
}

/* --- Story Chapters --- */
.story-chapter {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 10vh 8vw;
    overflow: hidden;
}

/* Grid Column Helpers */
.grid-col {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.col-left {
    align-items: flex-start;
}

.col-center {
    align-items: flex-start;
}

.col-right {
    align-items: flex-end;
}

/* Chapter 1: The Silence */
.chapter-silence {
    min-height: 120vh;
}

.chapter-silence .chapter-grid {
    display: grid;
    grid-template-columns: 80px 1fr 80px;
    width: 100%;
    max-width: 1400px;
    gap: 4vw;
    align-items: center;
}

.chapter-marker {
    font-family: var(--font-flex);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.3em;
    color: var(--accent);
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
}

.poetic-text-block {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.text-reveal {
    font-family: var(--font-main);
    font-size: clamp(2.5rem, 8vw, 6rem);
    font-weight: 300;
    line-height: 1.1;
    letter-spacing: 0.05em;
    color: var(--text);
    opacity: 0;
    transform: translateY(60px);
    display: block;
}

.text-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
    transition: all 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.text-line-2 {
    transition-delay: 0.2s;
}

.poetic-translation {
    font-family: var(--font-main);
    font-size: clamp(0.9rem, 1.5vw, 1.1rem);
    font-style: italic;
    color: var(--accent);
    margin-top: 4vh;
    opacity: 0;
    transform: translateY(30px);
    letter-spacing: 0.02em;
}

.poetic-translation.revealed {
    opacity: 0.7;
    transform: translateY(0);
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1) 0.6s;
}

.vertical-text {
    font-family: var(--font-flex);
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.5em;
    color: rgba(49, 49, 49, 0.1);
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

/* Floating Dots */
.chapter-visual {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 0;
}

.floating-dot {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text);
    opacity: 0.08;
}

.dot-1 { top: 20%; left: 15%; }
.dot-2 { top: 60%; right: 20%; }
.dot-3 { bottom: 25%; left: 30%; }

/* Chapter 2: The Space */
.chapter-space {
    min-height: 150vh;
    background: linear-gradient(180deg, transparent 0%, rgba(250, 250, 250, 0.5) 50%, transparent 100%);
}

.chapter-space .chapter-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    max-width: 1600px;
    gap: 8vw;
    align-items: center;
}

.typography-giant {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.giant-letter {
    font-family: var(--font-flex);
    font-size: clamp(10rem, 25vw, 20rem);
    font-weight: 900;
    line-height: 0.85;
    color: transparent;
    -webkit-text-stroke: 1px rgba(49, 49, 49, 0.15);
    opacity: 0;
    transform: translateX(-100px);
}

.giant-letter.revealed {
    opacity: 1;
    transform: translateX(0);
    transition: all 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.letter-2.revealed {
    transition-delay: 0.15s;
}

.philosophy-text {
    display: flex;
    flex-direction: column;
    gap: 6vh;
}

.text-fragment {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.fragment-line {
    font-family: var(--font-main);
    font-size: clamp(1.2rem, 2.5vw, 2rem);
    font-weight: 300;
    line-height: 1.4;
    color: var(--text);
    opacity: 0;
    transform: translateY(40px);
}

.fragment-line.revealed {
    opacity: 1;
    transform: translateY(0);
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.scroll-progress-line {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 1px;
    height: 0;
    background: linear-gradient(180deg, transparent 0%, var(--text) 50%, transparent 100%);
    transform: translateX(-50%);
    opacity: 0.2;
}

/* Chapter 3: The Echo */
.chapter-echo {
    min-height: 130vh;
    perspective: 1000px;
}

.echo-container {
    position: relative;
    width: 100%;
    height: 60vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.echo-word {
    position: absolute;
    font-family: var(--font-flex);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.03em;
    color: transparent;
    -webkit-text-stroke: 1px rgba(49, 49, 49, 0.08);
    opacity: 0;
    transform: translateY(100px) scale(0.8);
}

.echo-word.revealed {
    opacity: 1;
    transition: all 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.echo-1 { 
    font-size: clamp(4rem, 12vw, 10rem); 
    transform: translateY(-120px) translateX(-20%);
    -webkit-text-stroke: 1px rgba(49, 49, 49, 0.04);
}
.echo-2 { 
    font-size: clamp(5rem, 15vw, 12rem); 
    transform: translateY(-60px) translateX(10%);
    -webkit-text-stroke: 1px rgba(49, 49, 49, 0.08);
}
.echo-3 { 
    font-size: clamp(6rem, 18vw, 15rem); 
    transform: translateY(0px) translateX(-5%);
    -webkit-text-stroke: 1px rgba(49, 49, 49, 0.12);
}
.echo-4 { 
    font-size: clamp(7rem, 22vw, 18rem); 
    transform: translateY(80px) translateX(5%);
    -webkit-text-stroke: 1.5px rgba(49, 49, 49, 0.2);
}

.echo-1.revealed { transform: translateY(-120px) translateX(-20%) scale(1); transition-delay: 0s; }
.echo-2.revealed { transform: translateY(-60px) translateX(10%) scale(1); transition-delay: 0.1s; }
.echo-3.revealed { transform: translateY(0px) translateX(-5%) scale(1); transition-delay: 0.2s; }
.echo-4.revealed { transform: translateY(80px) translateX(5%) scale(1); transition-delay: 0.3s; }

.echo-center {
    position: relative;
    z-index: 10;
}

.echo-question {
    font-family: var(--font-main);
    font-size: clamp(1.2rem, 2vw, 1.8rem);
    font-style: italic;
    color: var(--text);
    opacity: 0;
    transform: scale(0.9);
}

.echo-question.revealed {
    opacity: 1;
    transform: scale(1);
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1) 0.5s;
}

/* Chapter 4: The Pause - Philosophical Breathing Space */
.chapter-pause {
    min-height: 100vh;
    padding: 15vh 5vw;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(180deg, transparent 0%, rgba(250, 250, 250, 0.6) 50%, transparent 100%);
}

.pause-container {
    width: 100%;
    max-width: 1200px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 8vw;
    align-items: center;
}

.pause-label {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.pause-content {
    display: flex;
    flex-direction: column;
    gap: 3vh;
}

.pause-quote {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    border: none;
}

.quote-line {
    font-family: var(--font-main);
    font-size: clamp(2rem, 6vw, 4.5rem);
    font-weight: 300;
    line-height: 1.15;
    letter-spacing: 0.03em;
    color: var(--text);
    opacity: 0;
    transform: translateY(50px);
}

.quote-line.revealed {
    opacity: 1;
    transform: translateY(0);
    transition: all 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.quote-line:nth-child(2).revealed {
    transition-delay: 0.15s;
}

.pause-translation {
    font-family: var(--font-main);
    font-size: clamp(0.85rem, 1.3vw, 1rem);
    font-style: italic;
    color: var(--accent);
    opacity: 0;
    transform: translateY(20px);
    letter-spacing: 0.01em;
    max-width: 500px;
}

.pause-translation.revealed {
    opacity: 0.65;
    transform: translateY(0);
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1) 0.4s;
}

.pause-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.breath-circle {
    width: 80px;
    height: 80px;
    border: 1px solid rgba(17, 17, 17, 0.1);
    border-radius: 50%;
    opacity: 0;
    transform: scale(0.5);
}

.breath-circle.revealed {
    opacity: 1;
    transform: scale(1);
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1) 0.3s;
    animation: breathe 4s ease-in-out infinite;
}

@keyframes breathe {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.15); opacity: 0.6; }
}

/* Chapter 5: Experimental Work Index Footer */
.footer-index-section {
    min-height: auto;
    display: block;
    padding: 0;
    overflow: hidden;
}

.experimental-footer {
    min-height: 100vh;
    min-height: 100svh;
    background:
        linear-gradient(90deg, rgba(5, 5, 5, 0.08) 1px, transparent 1px) 0 0 / calc(100% / 12) 100%,
        linear-gradient(0deg, rgba(5, 5, 5, 0.05) 1px, transparent 1px) 0 0 / 100% 5.5rem,
        #f7f7f5;
    color: #050505;
    position: relative;
    overflow: hidden;
    cursor: crosshair;
    z-index: 10;
    border-top: 1px solid #111111;
    border-bottom: 1px solid #111111;
    font-family: var(--font-main);
    font-variation-settings: 'wght' 520;
    isolation: isolate;
}

.experimental-footer::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        repeating-linear-gradient(135deg, transparent 0 18px, rgba(0, 98, 255, 0.08) 18px 19px, transparent 19px 36px),
        radial-gradient(circle at 76% 28%, rgba(202, 255, 53, 0.5), transparent 12rem);
    mix-blend-mode: multiply;
    opacity: 0.65;
}

.experimental-footer::after {
    content: "contact / reroute / continue";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    z-index: 1;
    padding: 0.65rem 2rem;
    border-top: 1px solid #111111;
    border-bottom: 1px solid #111111;
    background: rgba(247, 247, 245, 0.82);
    color: #666666;
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.34em;
    line-height: 1;
    text-align: center;
    text-transform: uppercase;
    transform: translateY(-50%) rotate(-1.2deg);
    pointer-events: none;
}

#footer-wave-canvas {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60vh;
    z-index: 0;
    pointer-events: none;
}

.exp-bg-text {
    position: absolute;
    left: 50%;
    top: 52%;
    z-index: 0;
    max-width: none;
    color: transparent;
    font-family: var(--font-main);
    font-size: clamp(7rem, 22vw, 22rem);
    font-weight: 760;
    font-variation-settings: 'wght' 760;
    letter-spacing: -0.13em;
    line-height: 0.78;
    opacity: 0.8;
    pointer-events: none;
    text-transform: uppercase;
    transform: translate(-50%, -50%);
    user-select: none;
    white-space: nowrap;
    -webkit-text-stroke: 1px rgba(5, 5, 5, 0.16);
    transition: opacity 0.5s ease, -webkit-text-stroke 0.5s ease;
}

.experimental-footer:hover .exp-bg-text {
    opacity: 0.46;
    -webkit-text-stroke-color: rgba(5, 5, 5, 0.28);
}

.exp-footer-rule {
    position: absolute;
    left: 2rem;
    right: 2rem;
    z-index: 1;
    height: 1px;
    background: #111111;
    pointer-events: none;
}

.exp-footer-rule-top {
    top: 2rem;
}

.exp-footer-rule-bottom {
    bottom: 2rem;
}

.exp-footer-spine {
    position: absolute;
    top: 2rem;
    bottom: 2rem;
    left: calc((100% / 12) * 1);
    z-index: 1;
    width: 1px;
    background: #111111;
    pointer-events: none;
}

.exp-footer-spine span {
    position: absolute;
    left: 0.9rem;
    display: block;
    width: max-content;
    transform: rotate(90deg);
    transform-origin: left top;
    color: #666666;
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0.26em;
    line-height: 1;
    text-transform: uppercase;
}

.exp-footer-spine span:nth-child(1) {
    top: 0;
}

.exp-footer-spine span:nth-child(2) {
    top: 43%;
}

.exp-footer-spine span:nth-child(3) {
    bottom: 0;
}

.dragg-item {
    position: absolute;
    z-index: 100;
    background: #ffffff;
    color: #050505;
    border: 1px solid #111111;
    border-radius: 0;
    box-shadow: 0.45rem 0.45rem 0 #111111;
    cursor: grab;
    overflow: hidden;
    isolation: isolate;
    -webkit-tap-highlight-color: transparent;
    transition: box-shadow 0.22s ease, background 0.22s ease, color 0.22s ease;
    will-change: transform;
    --tap-x: 50%;
    --tap-y: 50%;
}

.dragg-item::before {
    content: "drag";
    position: absolute;
    top: 0;
    right: 0;
    z-index: 1;
    padding: 0.4rem 0.48rem 0.38rem;
    border-left: 1px solid currentColor;
    border-bottom: 1px solid currentColor;
    background: #caff35;
    color: #050505;
    font-size: 0.58rem;
    font-weight: 850;
    letter-spacing: 0.18em;
    line-height: 1;
    text-transform: uppercase;
}

.dragg-item::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    background: radial-gradient(circle at var(--tap-x) var(--tap-y), rgba(0, 98, 255, 0.2), rgba(202, 255, 53, 0.12) 30%, transparent 62%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
}

.dragg-item > * {
    position: relative;
    z-index: 2;
}

.dragg-item:hover,
.dragg-item.is-touch-active {
    background: #050505;
    color: #ffffff;
    box-shadow: 0.28rem 0.28rem 0 #0062ff;
}

.dragg-item:hover::after,
.dragg-item.is-touch-active::after {
    opacity: 1;
}

.dragg-item:active {
    cursor: grabbing;
    z-index: 200 !important;
    box-shadow: 0.14rem 0.14rem 0 #0062ff;
}

.exp-title {
    top: clamp(4rem, 9vh, 6.5rem);
    left: calc((100% / 12) * 1.55);
    width: min(52rem, 62vw);
    padding: clamp(1.1rem, 2vw, 1.6rem) clamp(1rem, 2vw, 1.5rem) clamp(1.35rem, 2.6vw, 2.4rem);
    transform: rotate(-1deg);
}

.exp-index,
.exp-tag {
    display: block;
    color: #666666;
    font-family: var(--font-main);
    font-size: 0.72rem;
    font-weight: 850;
    font-variation-settings: 'wght' 760;
    letter-spacing: 0.28em;
    line-height: 1.3;
    text-transform: uppercase;
}

.dragg-item:hover .exp-index,
.dragg-item:hover .exp-tag,
.dragg-item.is-touch-active .exp-index,
.dragg-item.is-touch-active .exp-tag {
    color: #caff35;
}

.exp-title h2 {
    margin: 0.65rem 0 0;
    max-width: 11ch;
    font-family: var(--font-main);
    font-size: clamp(4.2rem, 10vw, 10.5rem);
    font-weight: 700;
    font-variation-settings: 'wght' 700;
    letter-spacing: -0.11em;
    line-height: 0.78;
}

.exp-title .headline-italic {
    color: inherit;
    font-style: italic;
    font-weight: 520;
    font-variation-settings: 'wght' 520;
}

.exp-discover {
    top: 10%;
    right: calc((100% / 12) * 0.75);
    width: min(21rem, 25vw);
    min-width: 230px;
    padding: 1rem 1rem 1.15rem;
    transform: rotate(2.6deg);
}

.exp-discover-text {
    margin: 0.45rem 1.4rem 0 0;
    color: inherit;
    font-family: var(--font-main);
    font-size: clamp(1.55rem, 3vw, 3rem);
    font-weight: 680;
    font-variation-settings: 'wght' 680;
    letter-spacing: -0.075em;
    line-height: 0.88;
}

.exp-email {
    top: 43%;
    left: calc((100% / 12) * 2.15);
    display: grid;
    grid-template-columns: minmax(8rem, 0.32fr) minmax(0, 1fr) auto;
    gap: 0.85rem;
    align-items: center;
    width: min(72rem, 76vw);
    padding: 0.95rem 1rem;
    transform: rotate(0.7deg);
}

.exp-email a {
    min-width: 0;
    color: inherit;
    font-family: var(--font-main);
    font-size: clamp(1.8rem, 5.2vw, 6rem);
    font-weight: 670;
    font-variation-settings: 'wght' 670;
    letter-spacing: -0.085em;
    line-height: 0.88;
    overflow-wrap: anywhere;
    text-decoration: none;
}

.exp-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    aspect-ratio: 1;
    border: 1px solid currentColor;
    color: inherit;
    font-size: 1.35rem;
    line-height: 1;
}

.exp-socials {
    right: calc((100% / 12) * 0.75);
    bottom: 17%;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    width: min(25rem, 28vw);
    padding: 1rem;
    transform: rotate(-1.8deg);
}

.exp-links {
    display: flex;
    flex-direction: column;
    border-top: 1px solid currentColor;
}

.exp-links a {
    position: relative;
    display: block;
    width: 100%;
    color: inherit;
    text-decoration: none;
}

.exp-social-link {
    width: 100% !important;
}

.exp-social-link-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    padding: 0.75rem 0;
    border-bottom: 1px solid currentColor;
    transition: padding-left 0.25s ease;
}

.exp-social-link-inner::after {
    content: '\2197';
    color: currentColor;
    font-size: 0.95rem;
}

.exp-social-link:hover .exp-social-link-inner {
    padding-left: 0.5rem;
}

.exp-social-name {
    color: inherit;
    font-family: var(--font-main);
    font-size: clamp(1.4rem, 2.5vw, 2.4rem);
    font-weight: 650;
    font-variation-settings: 'wght' 650;
    letter-spacing: -0.07em;
    line-height: 0.9;
}

.exp-time {
    bottom: 21%;
    left: calc((100% / 12) * 1.55);
    width: min(21rem, 22vw);
    min-width: 220px;
    padding: 1rem;
    transform: rotate(1.6deg);
}

.exp-time-val {
    display: block;
    margin-top: 0.55rem;
    font-family: var(--font-main);
    font-size: clamp(2.2rem, 4.8vw, 5.5rem);
    font-weight: 640;
    font-variation-settings: 'wght' 640;
    letter-spacing: -0.08em;
    line-height: 0.8;
    font-variant-numeric: tabular-nums;
}

.exp-colophon {
    bottom: 7%;
    left: calc((100% / 12) * 4.65);
    width: min(23rem, 25vw);
    padding: 1rem;
    transform: rotate(-2.4deg);
}

.exp-colophon p {
    margin: 0.65rem 1.4rem 0 0;
    color: inherit;
    font-family: var(--font-main);
    font-size: clamp(1.3rem, 2.2vw, 2.2rem);
    font-style: italic;
    font-weight: 540;
    font-variation-settings: 'wght' 540;
    letter-spacing: -0.055em;
    line-height: 1;
}

.exp-copyright {
    left: 2rem;
    bottom: 2rem;
    padding: 0.58rem 0.75rem 0.52rem;
    transform: rotate(-1deg);
    box-shadow: none;
}

.exp-copyright::before {
    display: none;
}

.exp-copyright p {
    margin: 0;
    color: inherit;
    font-size: 0.72rem;
    font-weight: 800;
    font-variation-settings: 'wght' 760;
    letter-spacing: 0.2em;
    line-height: 1;
    text-transform: uppercase;
}

.exp-backtop {
    right: 2rem;
    bottom: 2rem;
    width: 4.6rem;
    height: 4.6rem;
    padding: 0;
    border-radius: 50%;
    box-shadow: 0.28rem 0.28rem 0 #111111;
}

.scroll-to-top {
    appearance: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: inherit;
    background: transparent;
    color: inherit;
    font: inherit;
}

.exp-backtop::before {
    content: "top";
    border-radius: 50%;
}

.exp-backtop .top-arrow {
    color: inherit;
    font-size: 1.6rem;
    font-weight: 650;
    line-height: 1;
}

/* ============================================
   FOOTER STORY RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .chapter-silence .chapter-grid {
        grid-template-columns: 40px 1fr 40px;
    }

    .chapter-space .chapter-grid {
        grid-template-columns: 1fr;
        gap: 6vh;
    }

    .typography-giant {
        flex-direction: row;
        justify-content: center;
    }

    .giant-letter {
        font-size: clamp(8rem, 20vw, 12rem);
    }

    .philosophy-text {
        text-align: center;
        align-items: center;
    }

    /* Chapter 4: Pause */
    .pause-container {
        grid-template-columns: 1fr;
        gap: 4vh;
        text-align: center;
    }

    .pause-label {
        justify-content: center;
    }

    .pause-visual {
        order: -1;
    }

    /* Chapter 5: Experimental Footer Tablet */
    .experimental-footer {
        min-height: 92vh;
    }

    .exp-footer-spine {
        left: 1.25rem;
    }

    .exp-title {
        top: 5.25rem;
        left: 3.2rem;
        width: min(38rem, 68vw);
    }

    .exp-discover {
        top: 8.5rem;
        right: 1.25rem;
        width: min(19rem, 32vw);
        min-width: 205px;
    }

    .exp-email {
        top: 42%;
        left: 3.2rem;
        grid-template-columns: minmax(6.5rem, 0.25fr) minmax(0, 1fr) auto;
        width: calc(100% - 5rem);
    }

    .exp-socials {
        right: 1.25rem;
        bottom: 16%;
        width: min(21rem, 38vw);
    }

    .exp-time {
        left: 3.2rem;
        bottom: 17%;
        width: min(19rem, 34vw);
    }

    .exp-colophon {
        left: 32%;
        bottom: 6rem;
        width: min(20rem, 32vw);
    }

    .exp-copyright {
        left: 1.25rem;
    }

    .exp-backtop {
        right: 1.25rem;
    }
}

@media (max-width: 768px) {
    .story-chapter {
        padding: 8vh 5vw;
    }

    .chapter-silence .chapter-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .col-center {
        align-items: center;
    }

    .poetic-text-block {
        align-items: center;
    }

    .chapter-marker,
    .vertical-text {
        display: none;
    }

    .text-reveal {
        font-size: clamp(2rem, 10vw, 3.5rem);
        text-align: center;
    }

    .poetic-translation {
        text-align: center;
    }

    .giant-letter {
        font-size: clamp(5rem, 18vw, 8rem);
    }

    .fragment-line {
        font-size: clamp(1rem, 4vw, 1.5rem);
        text-align: center;
    }

    .text-fragment {
        align-items: center;
    }

    .echo-word {
        font-size: clamp(2rem, 10vw, 5rem) !important;
    }

    .echo-1.revealed { transform: translateY(-80px) translateX(-10%) scale(1); }
    .echo-2.revealed { transform: translateY(-40px) translateX(5%) scale(1); }
    .echo-3.revealed { transform: translateY(0px) translateX(-2%) scale(1); }
    .echo-4.revealed { transform: translateY(50px) translateX(2%) scale(1); }

    /* Chapter 4: Pause mobile */
    .quote-line {
        font-size: clamp(1.5rem, 8vw, 2.5rem);
    }

    .pause-translation {
        text-align: center;
        max-width: 100%;
    }

    .breath-circle {
        width: 60px;
        height: 60px;
    }

    /* Chapter 5: Experimental Footer Mobile */
    .experimental-footer {
        min-height: 118vh;
        background:
            linear-gradient(90deg, rgba(5, 5, 5, 0.08) 1px, transparent 1px) 0 0 / 25% 100%,
            linear-gradient(0deg, rgba(5, 5, 5, 0.05) 1px, transparent 1px) 0 0 / 100% 4.25rem,
            #f7f7f5;
    }

    .experimental-footer::after {
        top: 46%;
        padding: 0.55rem 1rem;
        font-size: 0.62rem;
        letter-spacing: 0.22em;
    }

    .exp-bg-text {
        top: 42%;
        font-size: clamp(5.4rem, 31vw, 10rem);
        letter-spacing: -0.14em;
        writing-mode: vertical-rl;
    }

    .exp-footer-rule {
        left: 1rem;
        right: 1rem;
    }

    .exp-footer-rule-top {
        top: 1rem;
    }

    .exp-footer-rule-bottom {
        bottom: 1rem;
    }

    .exp-footer-spine {
        display: none;
    }

    .dragg-item {
        box-shadow: 0.28rem 0.28rem 0 #111111;
    }

    .dragg-item::before {
        font-size: 0.52rem;
        letter-spacing: 0.12em;
    }

    .exp-title {
        top: 2.3rem;
        left: 1rem;
        width: calc(100% - 2rem);
        padding: 0.95rem 0.85rem 1.15rem;
        transform: rotate(-0.8deg);
    }

    .exp-title h2 {
        max-width: 9ch;
        font-size: clamp(3.3rem, 18vw, 5.8rem);
    }

    .exp-discover {
        top: 27%;
        right: 1rem;
        min-width: 0;
        width: min(17rem, calc(72% - 1rem));
        padding: 0.85rem;
    }

    .exp-discover-text {
        font-size: clamp(1.55rem, 8vw, 2.45rem);
    }

    .exp-email {
        top: 43%;
        left: 1rem;
        grid-template-columns: 1fr auto;
        width: calc(100% - 2rem);
        padding: 0.8rem;
        transform: rotate(0.6deg);
    }

    .exp-email .exp-tag {
        grid-column: 1 / -1;
    }

    .exp-email a {
        font-size: clamp(1.8rem, 12vw, 3.55rem);
    }

    .exp-arrow {
        width: 2.6rem;
    }

    .exp-socials {
        right: 1rem;
        bottom: 18%;
        width: min(17rem, 52vw);
        padding: 0.8rem;
    }

    .exp-social-link-inner {
        gap: 0.75rem;
        padding: 0.58rem 0;
    }

    .exp-social-name {
        font-size: clamp(1.2rem, 6vw, 1.8rem);
    }

    .exp-time {
        bottom: 23%;
        left: 1rem;
        width: min(15rem, 43vw);
        min-width: 0;
        padding: 0.8rem;
    }

    .exp-time-val {
        font-size: clamp(2rem, 9vw, 3.2rem);
    }

    .exp-colophon {
        bottom: 9%;
        left: 1rem;
        width: min(18rem, 54vw);
        padding: 0.8rem;
        transform: rotate(-2deg);
    }

    .exp-colophon p {
        font-size: clamp(1.2rem, 5.8vw, 1.8rem);
    }

    .exp-copyright {
        bottom: 1rem;
        left: 1rem;
        max-width: calc(100% - 6rem);
    }

    .exp-backtop {
        right: 1rem;
        bottom: 1rem;
        width: 3.7rem;
        height: 3.7rem;
    }
}

/* Touch device enhancements for footer */
@media (hover: none) and (pointer: coarse) {
    .dragg-item:hover {
        background: #ffffff;
        color: #050505;
        box-shadow: 0.28rem 0.28rem 0 #111111;
    }

    .mosaic-item:hover {
        transform: none;
        box-shadow: none;
    }

    .mosaic-item:active {
        transform: scale(0.98);
    }

    .cta-email:hover {
        transform: none;
        box-shadow: none;
        background: transparent;
        color: var(--text);
    }

    .cta-email:active {
        background: var(--text);
        color: #f5f5f5;
    }
}

/* --- Footer Section (Legacy fallback) --- */
.footer-section {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2rem;
    padding-top: 10vh;
    overflow: hidden;
}

.marquee-container {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    transform: rotate(-2deg);
}

.marquee-content {
    display: inline-block;
    animation: scroll 20s linear infinite;
}

.marquee-text {
    font-size: 10vw;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text);
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    font-size: 0.9rem;
    font-weight: 500;
}

.links {
    display: flex;
    gap: 2rem;
}

.contact-link {
    position: relative;
    display: inline-block;
}

.contact-link::after {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 1px;
    bottom: 0;
    left: 0;
    background-color: var(--text);
    transform-origin: bottom right;
    transition: transform 0.25s ease-out;
}

.contact-link:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* ============================================
   EXPERIMENTAL EDITORIAL FOOTER
   Newspaper-style Grid System Design
   ============================================ */

.editorial-footer {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 0;
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, #e6e6e6 0%, #f2f2f2 50%, #e6e6e6 100%);
}

/* --- Masthead --- */
.editorial-masthead {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 2rem 4vw;
    border-bottom: 1px solid var(--text);
    position: relative;
    z-index: 10;
}

.masthead-left,
.masthead-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent);
}

.masthead-right {
    justify-content: flex-end;
}

.edition-divider {
    font-size: 0.5rem;
    opacity: 0.5;
}

.masthead-center {
    text-align: center;
}

.editorial-logo {
    font-family: var(--font-flex);
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1;
    margin: 0;
}

.editorial-tagline {
    display: block;
    font-size: 0.7rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.4em;
    color: var(--accent);
    margin-top: 0.5rem;
}

/* --- Editorial Grid System --- */
.editorial-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: auto auto;
    gap: 0;
    flex: 1;
    position: relative;
    z-index: 5;
}

/* Main Feature */
.grid-main-feature {
    grid-column: 1;
    grid-row: 1;
    padding: 8vh 4vw;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-right: 1px solid var(--text);
    position: relative;
}

.feature-category {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: var(--accent);
    margin-bottom: 3vh;
}

.feature-headline {
    font-family: var(--font-flex);
    font-size: clamp(3rem, 10vw, 10rem);
    font-weight: 900;
    line-height: 0.85;
    letter-spacing: -0.04em;
    margin: 0;
    position: relative;
}

.headline-word {
    display: block;
    position: relative;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.headline-word.word-2 {
    margin-left: 10%;
    color: transparent;
    -webkit-text-stroke: 1.5px var(--text);
}

.headline-word.word-3 {
    margin-left: 5%;
}

.grid-main-feature:hover .headline-word.word-1 {
    transform: translateX(2%);
}

.grid-main-feature:hover .headline-word.word-2 {
    transform: translateX(-1%);
}

.grid-main-feature:hover .headline-word.word-3 {
    transform: translateX(3%);
}

.feature-lead {
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    line-height: 1.6;
    max-width: 45ch;
    margin-top: 4vh;
    color: var(--accent);
}

.feature-cta {
    margin-top: 4vh;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    background: var(--text);
    color: #e6e6e6;
    border: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    letter-spacing: 0.15em;
}

/* Sidebar */
.grid-sidebar {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    flex-direction: column;
}

.sidebar-card {
    flex: 1;
    padding: 4vh 3vw;
    border-bottom: 1px solid var(--text);
    position: relative;
    overflow: hidden;
    transition: background 0.4s ease;
}

.sidebar-card:last-child {
    border-bottom: none;
}

.sidebar-card:hover {
    background: rgba(0, 0, 0, 0.02);
}

.card-number {
    position: absolute;
    top: 3vh;
    right: 3vw;
    font-family: var(--font-flex);
    font-size: 4rem;
    font-weight: 900;
    line-height: 1;
    color: rgba(49, 49, 49, 0.05);
    pointer-events: none;
}

.card-title {
    font-family: var(--font-flex);
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0 0 1.5vh 0;
}

.card-text {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--accent);
    max-width: 30ch;
}

/* Bottom Strip */
.grid-bottom-strip {
    grid-column: 1 / -1;
    grid-row: 2;
    display: grid;
    grid-template-columns: auto 1fr auto;
    border-top: 1px solid var(--text);
    position: relative;
}

.connect-block,
.index-block {
    padding: 3vh 4vw;
    display: flex;
    flex-direction: column;
    gap: 1.5vh;
}

.connect-label,
.index-label {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: var(--accent);
}

.connect-links {
    display: flex;
    gap: 0;
}

.connect-link {
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
    padding-right: 0.5rem;
}

.connect-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--text);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.connect-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Ticker Tape */
.ticker-tape {
    border-left: 1px solid var(--text);
    border-right: 1px solid var(--text);
    overflow: hidden;
    display: flex;
    align-items: center;
    background: var(--text);
    color: #e6e6e6;
}

.ticker-content {
    display: flex;
    gap: 2rem;
    white-space: nowrap;
    animation: ticker 20s linear infinite;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    padding: 0 2rem;
}

.ticker-dot {
    font-size: 0.4rem;
    opacity: 0.5;
}

@keyframes ticker {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.index-block {
    text-align: right;
}

.index-items {
    display: flex;
    gap: 2rem;
    justify-content: flex-end;
}

.index-item {
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
    cursor: pointer;
    transition: color 0.2s ease;
}

.index-item:hover {
    color: var(--accent);
}

/* Colophon */
.editorial-colophon {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 2rem 4vw;
    border-top: 1px solid var(--text);
    font-size: 0.7rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent);
    position: relative;
    z-index: 10;
}

.colophon-center {
    text-align: center;
}

.colophon-right {
    text-align: right;
}

/* Decorative Grid Lines */
.grid-lines {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1;
}

.grid-line {
    position: absolute;
    background: rgba(17, 17, 17, 0.03);
}

.grid-line.vertical {
    width: 1px;
    height: 100%;
    top: 0;
}

.grid-line.horizontal {
    height: 1px;
    width: 100%;
    left: 0;
}

.grid-line.line-1 { left: 25%; }
.grid-line.line-2 { left: 50%; }
.grid-line.line-3 { left: 75%; }
.grid-line.line-4 { top: 33.33%; }
.grid-line.line-5 { top: 66.66%; }

/* --- Editorial Footer Responsive --- */
@media (max-width: 1024px) {
    .editorial-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
    }

    .grid-main-feature {
        grid-column: 1;
        grid-row: 1;
        border-right: none;
        border-bottom: 1px solid var(--text);
        padding: 6vh 4vw;
    }

    .grid-sidebar {
        grid-column: 1;
        grid-row: 2;
        flex-direction: row;
    }

    .sidebar-card {
        flex: 1;
        border-right: 1px solid var(--text);
        border-bottom: none;
    }

    .sidebar-card:last-child {
        border-right: none;
    }

    .grid-bottom-strip {
        grid-column: 1;
        grid-row: 3;
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
    }

    .ticker-tape {
        border-left: none;
        border-right: none;
        border-top: 1px solid var(--text);
        border-bottom: 1px solid var(--text);
    }

    .index-block {
        text-align: left;
        border-top: 1px solid var(--text);
    }

    .index-items {
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    .editorial-masthead {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
        padding: 1.5rem;
    }

    .masthead-left,
    .masthead-right {
        justify-content: center;
    }

    .feature-headline {
        font-size: clamp(2.5rem, 15vw, 5rem);
    }

    .headline-word.word-2 {
        margin-left: 0;
    }

    .headline-word.word-3 {
        margin-left: 0;
    }

    .grid-sidebar {
        flex-direction: column;
    }

    .sidebar-card {
        border-right: none;
        border-bottom: 1px solid var(--text);
    }

    .card-number {
        font-size: 2.5rem;
    }

    .editorial-colophon {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        text-align: center;
    }

    .colophon-left,
    .colophon-right {
        text-align: center;
    }

    .grid-lines {
        display: none;
    }
}

/* --- Utility --- */
.magnetic-wrap {
    display: inline-block;
    padding: 10px;
}

.magnetic-btn {
    display: inline-block;
    transition: transform 0.2s cubic-bezier(0.1, 0.9, 0.2, 1);
}

/* Background Rex */
#rex-bg {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-size: 30vw;
    opacity: 0;
    pointer-events: none;
    z-index: 0;
    filter: grayscale(1);
    will-change: opacity, transform;
}

/* --- Kinetic Philosophy Section --- */
.philosophy-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    overflow: hidden;
    padding: 5vh 0 0;
    position: relative;
}

/* --- Global Noise Overlay --- */
body::after {
    content: "";
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 9998;
    opacity: 0.4;
    transition: opacity 0.2s ease;
    will-change: transform; /* Own compositing layer a�ᡨ prevents scroll repaint interference */
}

/* --- Modal - Experimental Design --- */
.modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 1000;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    overflow: hidden;
}

.modal-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px) saturate(150%);
}

.modal-content {
    position: relative;
    width: 100%;
    height: 100%;
    background: #fafafa;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    opacity: 1;
    overscroll-behavior: contain;
}

/* Close Button */
.modal-close-wrap {
    position: fixed;
    top: 2rem; right: 2rem;
    z-index: 100;
    border-radius: 50%;
}

.modal-close {
    position: relative;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid #f4f4f5;
    padding: 0;
    cursor: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a1a1aa;
    transition: background 0.2s ease, color 0.2s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: var(--font-main);
}

.modal-close .close-icon-svg {
    width: 18px;
    height: 18px;
    display: block;
    pointer-events: none;
    overflow: visible;
}

.modal-close .close-icon-svg line {
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    transition: none;
}

.modal-close .close-icon-svg path {
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: none;
}

.modal-close .close-text {
    display: none;
}

.modal-close:hover {
    background: #f4f4f5;
    color: #313131;
    transform: translateX(2px);
}

.modal-close:hover .close-icon-svg line {
    stroke: currentColor;
}

.modal-close:hover .close-icon-svg path {
    stroke: currentColor;
}

.modal-scroll-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow-y: scroll;
    overflow-x: hidden;
    scrollbar-gutter: stable;
    background: #fafafa;
    -webkit-overflow-scrolling: touch;
}

/* ===== HERO SECTION ===== */
.modal-hero-section {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
}

.hero-visual-container {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 1;
}

.modal-hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.1);
    transition: transform 8s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal.active .modal-hero-image {
    transform: scale(1);
}

.hero-gradient-overlay {
    position: absolute;
    bottom: 0; left: 0;
    width: 100%;
    height: 70%;
    background: linear-gradient(
        to top,
        rgba(250,250,250,1) 0%,
        rgba(250,250,250,0.95) 20%,
        rgba(250,250,250,0.6) 50%,
        rgba(250,250,250,0) 100%
    );
    z-index: 2;
}

/* Title Block - Breaking Traditional Constraints */
.hero-title-block {
    position: relative;
    z-index: 10;
    padding: 0 5vw 15vh 5vw;
    max-width: 100%;
}

.modal-meta-strip {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    font-family: var(--font-mono, monospace);
    font-size: clamp(0.75rem, 1.2vw, 1rem);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(49, 49, 49, 0.6);
}

.meta-divider {
    opacity: 0.3;
}

.modal-title {
    font-family: var(--font-flex);
    font-size: clamp(3rem, 15vw, 12rem);
    line-height: 0.85;
    font-weight: 900;
    font-variation-settings: 'wdth' 125;
    color: #313131;
    text-transform: uppercase;
    letter-spacing: -0.03em;
    margin: 0;
    display: flex;
    flex-direction: column;
}

.title-line {
    display: block;
    overflow: hidden;
}

.title-line-1 {
    transform-origin: left center;
}

.title-line-2 {
    color: transparent;
    -webkit-text-stroke: 2px #313131;
    text-stroke: 2px #313131;
    margin-left: 10vw;
}

/* Scroll Indicator - Minimalist */
.scroll-invite {
    position: absolute;
    bottom: 4vh;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

@keyframes float-subtle {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(4px); }
}

.scroll-line {
    width: 1px;
    height: 32px;
    background: rgba(17,17,17,0.25);
    position: relative;
    overflow: hidden;
}

.scroll-line::after {
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(17,17,17,0.6);
    animation: scroll-down 1.5s ease-in-out infinite;
}

@keyframes scroll-down {
    0% { top: -100%; }
    50% { top: 100%; }
    100% { top: 100%; }
}

.scroll-text {
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(49, 49, 49, 0.4);
    font-family: var(--font-main);
    font-weight: 400;
}

/* ===== OVERVIEW SECTION ===== */
.modal-overview-section {
    padding: 8vh 5vw 6vh 5vw;
    background: #fafafa;
    border-top: 1px solid rgba(17,17,17,0.08);
    position: relative;
    z-index: 1;
    isolation: isolate;
}

.overview-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 8vw;
    max-width: 1600px;
    margin: 0 auto;
    position: relative;
    z-index: 3;
}

.overview-label,
.story-label,
.gallery-header {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.section-number {
    font-family: var(--font-mono, monospace);
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    color: rgba(49, 49, 49, 0.35);
}

.section-title {
    font-family: var(--font-flex);
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 700;
    font-variation-settings: 'wdth' 110;
    color: #313131;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.overview-content {
    padding-top: 0.5rem;
}

.desc-text {
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    line-height: 1.7;
    color: rgba(49, 49, 49, 0.75);
    font-weight: 300;
    max-width: 700px;
}

/* ===== STORY SECTION ===== */
.modal-story-section {
    padding: 8vh 5vw 12vh 5vw;
    background: linear-gradient(
        180deg,
        rgba(250,250,250,0) 0%,
        rgba(250,250,250,0.55) 20%,
        #f0f0f0 50%,
        #fafafa 100%
    );
    position: relative;
    z-index: 4;
    overflow: visible;
}

.modal-story-section::before {
    content: '"';
    position: absolute;
    top: 5vh;
    left: 5vw;
    font-size: clamp(10rem, 20vw, 25rem);
    font-family: Georgia, serif;
    color: rgba(49, 49, 49, 0.03);
    line-height: 1;
    pointer-events: none;
}

.story-container {
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    z-index: 12;
}

/* Floating Sticker Image */
.floating-sticker-wrapper {
    position: absolute;
    z-index: 1;
    pointer-events: none;
}

.floating-sticker-wrapper.sticker-1 {
    top: calc(100% - 12vh);
    right: 0;
    width: clamp(350px, 50vw, 700px);
}

.floating-sticker {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 0;
    object-fit: cover;
    /* Fade the bottom of the image to transparent so text can overlap cleanly */
    -webkit-mask-image: linear-gradient(
        to top,
        rgba(0,0,0,0) 0%,
        rgba(0,0,0,0.1) 12%,
        rgba(0,0,0,0.6) 38%,
        rgba(0,0,0,1) 65%
    );
    mask-image: linear-gradient(
        to top,
        rgba(0,0,0,0) 0%,
        rgba(0,0,0,0.1) 12%,
        rgba(0,0,0,0.6) 38%,
        rgba(0,0,0,1) 65%
    );
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
}

/* Generic image placeholder state (4:3 gray block via SVG data URI) */
.img-placeholder {
    background: #d9d9d9;
}

.floating-sticker-fade {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(to top, rgba(250,250,250,0) 0%, rgba(250,250,250,0) 100%);
    border-radius: 0;
    pointer-events: none;
}

.story-label {
    margin-bottom: 4rem;
}

.story-text {
    position: relative;
    z-index: 3;
    font-family: var(--font-main);
    font-size: clamp(1.5rem, 3.5vw, 3rem);
    line-height: 1.5;
    font-weight: 300;
    color: #313131;
    border: none;
    padding: 0;
    margin: 0;
    quotes: none;
}

.modal-highlight {
    display: inline;
    padding: 0 0.08em;
    background-repeat: no-repeat;
    background-origin: border-box;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}

.modal-highlight--handwrite {
    background-image:
        radial-gradient(1.18em 0.62em at 99% 86%, rgba(255, 225, 122, 0.72), rgba(255, 225, 122, 0) 74%),
        radial-gradient(0.74em 0.36em at 96% 94%, rgba(255, 225, 122, 0.5), rgba(255, 225, 122, 0) 76%),
        linear-gradient(180deg, rgba(255, 225, 122, 0) 0%, rgba(255, 225, 122, 0) 30%, rgba(255, 225, 122, 0.46) 31%, rgba(255, 225, 122, 0.46) 84%, rgba(255, 225, 122, 0) 100%),
        linear-gradient(180deg, rgba(255, 225, 122, 0.22), rgba(255, 225, 122, 0.22));
    background-size: 1.18em 0.62em, 0.74em 0.36em, 100% 0.62em, 96% 0.34em;
    background-position: 100% calc(100% - 0.08em), 100% calc(100% + 0.01em), 0 calc(100% - 0.1em), 0 calc(100% - 0.2em);
    border-radius: 0.16em;
}

.modal-highlight--marker {
    background-image:
        linear-gradient(to right, rgba(255, 225, 122, 0.62), rgba(255, 225, 122, 0.62));
    background-size: 100% 0.7em;
    background-position: 0 calc(100% - 0.12em);
}

.modal-highlight--underline {
    background-image:
        linear-gradient(to right, rgba(255, 225, 122, 0.55), rgba(255, 225, 122, 0.55));
    background-size: 100% 0.2em;
    background-position: 0 calc(100% - 0.03em);
}

@supports (color: color-mix(in srgb, black 50%, white 50%)) {
    .modal-highlight--handwrite {
        background-image:
            radial-gradient(1.18em 0.62em at 99% 86%, color-mix(in srgb, var(--hl-color, #ffe17a) 72%, transparent), color-mix(in srgb, var(--hl-color, #ffe17a) 0%, transparent) 74%),
            radial-gradient(0.74em 0.36em at 96% 94%, color-mix(in srgb, var(--hl-color, #ffe17a) 50%, transparent), color-mix(in srgb, var(--hl-color, #ffe17a) 0%, transparent) 76%),
            linear-gradient(180deg, color-mix(in srgb, var(--hl-color, #ffe17a) 0%, transparent) 0%, color-mix(in srgb, var(--hl-color, #ffe17a) 0%, transparent) 30%, color-mix(in srgb, var(--hl-color, #ffe17a) 46%, transparent) 31%, color-mix(in srgb, var(--hl-color, #ffe17a) 46%, transparent) 84%, color-mix(in srgb, var(--hl-color, #ffe17a) 0%, transparent) 100%),
            linear-gradient(180deg, color-mix(in srgb, var(--hl-color, #ffe17a) 22%, transparent), color-mix(in srgb, var(--hl-color, #ffe17a) 22%, transparent));
        background-size: 1.18em 0.62em, 0.74em 0.36em, 100% 0.62em, 96% 0.34em;
        background-position: 100% calc(100% - 0.08em), 100% calc(100% + 0.01em), 0 calc(100% - 0.1em), 0 calc(100% - 0.2em);
    }

    .modal-highlight--marker {
        background-image:
            linear-gradient(to right, color-mix(in srgb, var(--hl-color, #ffe17a) 62%, transparent), color-mix(in srgb, var(--hl-color, #ffe17a) 62%, transparent));
    }

    .modal-highlight--underline {
        background-image:
            linear-gradient(to right, color-mix(in srgb, var(--hl-color, #ffe17a) 55%, transparent), color-mix(in srgb, var(--hl-color, #ffe17a) 55%, transparent));
    }
}

/* ===== GALLERY SECTION ===== */
.modal-gallery-section {
    position: relative;
    padding: 8vh 0 6vh 0;
    background: #fafafa;
}

/* Gallery Image with Caption */
.gallery-img-wrapper {
    position: relative;
    height: 60vh;
    max-height: 600px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
}

.gallery-img-wrapper.is-youtube {
    width: min(86vw, calc(60vh * 16 / 9));
    aspect-ratio: 16 / 9;
    background: #000;
    cursor: pointer;
}

.gallery-img-wrapper.is-youtube::before,
.gallery-img-wrapper.is-youtube::after {
    content: '';
    position: absolute;
    z-index: 2;
    pointer-events: none;
}

.gallery-img-wrapper.is-youtube::before {
    left: 50%;
    top: 50%;
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.58);
    border: 1px solid rgba(255, 255, 255, 0.36);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
    transform: translate(-50%, -50%);
    transition: transform 0.28s ease, background-color 0.28s ease;
}

.gallery-img-wrapper.is-youtube::after {
    left: calc(50% + 0.14rem);
    top: 50%;
    border-top: 0.82rem solid transparent;
    border-bottom: 0.82rem solid transparent;
    border-left: 1.2rem solid #fff;
    transform: translate(-45%, -50%);
}

.gallery-img-wrapper .gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), 
                filter 0.4s ease;
    filter: brightness(0.95);
    user-select: none;
    -webkit-user-drag: none;
}

.gallery-img-wrapper iframe.gallery-img {
    border: 0;
    display: block;
    pointer-events: none;
}

.gallery-img-wrapper:hover .gallery-img {
    transform: scale(1.03);
    filter: brightness(1);
}

.gallery-img-wrapper.is-youtube:hover .gallery-img {
    transform: none;
    filter: brightness(0.95);
}

.gallery-img-wrapper.is-youtube:hover::before {
    background: rgba(0, 0, 0, 0.72);
    transform: translate(-50%, -50%) scale(1.06);
}

.gallery-img-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 3rem 1.5rem 1.5rem 1.5rem;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 100%);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 400;
    line-height: 1.5;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-img-wrapper:hover .gallery-img-caption {
    opacity: 1;
    transform: translateY(0);
}

.gallery-header {
    padding: 0 5vw 2.25rem 5vw;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}

.gallery-title-row {
    display: inline-flex;
    align-items: baseline;
    gap: 0.8rem;
}

.gallery-title-row .section-number {
    margin-top: 0;
    line-height: 1;
}

.gallery-title-row .section-title {
    margin: 0;
    line-height: 1;
}

.gallery-nav-tools {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.gallery-arrow-controls {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(8vh + 4.5rem + min(30vh, 300px));
    z-index: 6;
    pointer-events: none;
}

.gallery-arrow {
    position: absolute;
    width: 3.15rem;
    height: 3.15rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(17, 17, 17, 0.16);
    border-radius: 999px;
    padding: 0;
    background: rgba(250, 250, 250, 0.88);
    color: rgba(49, 49, 49, 0.78);
    box-shadow: 0 14px 42px rgba(17, 17, 17, 0.12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    cursor: pointer;
    pointer-events: auto;
    touch-action: manipulation;
    transition: transform 0.28s ease, border-color 0.28s ease, background-color 0.28s ease, color 0.28s ease, opacity 0.28s ease;
}

.gallery-arrow-prev {
    left: clamp(1rem, 2.2vw, 2rem);
    transform: translateY(-50%);
}

.gallery-arrow-next {
    right: clamp(1rem, 2.2vw, 2rem);
    transform: translateY(-50%);
}

.gallery-arrow svg {
    width: 1.25rem;
    height: 1.25rem;
}

.gallery-arrow:hover {
    transform: translateY(-50%) scale(1.06);
    border-color: rgba(17, 17, 17, 0.42);
    background: #111;
    color: #fff;
}

.gallery-arrow:focus-visible {
    outline: 2px solid rgba(17, 17, 17, 0.64);
    outline-offset: 3px;
}

.gallery-arrow:disabled {
    opacity: 0.28;
    cursor: not-allowed;
    transform: translateY(-50%);
    background: rgba(250, 250, 250, 0.56);
    color: rgba(49, 49, 49, 0.44);
    box-shadow: none;
}

.gallery-scroll-hint {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(49, 49, 49, 0.4);
}

.swipe-arrow {
    width: 20px;
    height: 20px;
    animation: swipe-hint 1.5s ease-in-out infinite;
}

.gallery-dots {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    min-height: 1.2rem;
    max-width: min(44vw, 20rem);
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.gallery-dots::-webkit-scrollbar {
    display: none;
}

.gallery-dot {
    width: 1.45rem;
    height: 1.45rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 999px;
    padding: 0;
    background: transparent;
    touch-action: manipulation;
    transition: transform 0.34s cubic-bezier(0.22, 1, 0.36, 1);
    cursor: pointer;
}

.gallery-dot::before {
    content: '';
    width: 0.46rem;
    height: 0.46rem;
    border-radius: 999px;
    background: rgba(17, 17, 17, 0.25);
    transition: transform 0.34s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.28s ease;
}

.gallery-dot:hover {
    transform: scale(1.14);
}

.gallery-dot:hover::before {
    transform: scale(1.62);
    background: rgba(17, 17, 17, 0.48);
}

.gallery-dot.is-active {
    transform: scale(1.06);
}

.gallery-dot.is-active::before {
    transform: scale(1.68);
    background: rgba(17, 17, 17, 0.78);
}

.gallery-dot.is-active:hover {
    transform: scale(1.2);
}

.gallery-dot.is-active:hover::before {
    transform: scale(1.85);
}

.gallery-dot-ellipsis {
    color: rgba(49, 49, 49, 0.45);
    font-size: 0.75rem;
    line-height: 1;
    letter-spacing: 0.02em;
    user-select: none;
}

@keyframes swipe-hint {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(5px); }
}

.modal-gallery-track {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 0 5vw;
    cursor: grab;
}

.modal-gallery-track::-webkit-scrollbar {
    display: none;
}

.modal-gallery-track:active {
    cursor: grabbing;
}

.modal-gallery {
    display: flex;
    gap: 3vw;
    padding-right: 5vw;
    width: max-content;
}

/* Legacy standalone gallery-img (fallback) */
.modal-gallery > .gallery-img {
    height: 60vh;
    max-height: 600px;
    width: auto;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), 
                filter 0.5s ease;
    filter: brightness(0.9);
    user-select: none;
    -webkit-user-drag: none;
}

.modal-gallery > .gallery-img:hover {
    transform: scale(1.02);
    filter: brightness(1);
}

/* ===== END SECTION ===== */
.modal-end-section {
    min-height: 34vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 7vh 5vw 10vh;
    background: linear-gradient(180deg, #fafafa 0%, #eee 100%);
    text-align: center;
}

.end-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.project-links-container {
    display: flex;
    gap: 2rem;
    justify-content: center;
    align-items: flex-start;
    margin-top: 1.5rem;
}

.project-link-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.55rem;
}

.project-link-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    background: rgba(17, 17, 17, 0.05);
    color: #313131;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    text-decoration: none;
    position: relative;
}

.project-link-title {
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #313131;
    opacity: 0.6;
    font-weight: 600;
    white-space: nowrap;
    font-family: var(--font-flex);
    font-variation-settings: 'wdth' 100;
}

.modal-project-disclaimer {
    max-width: 48rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px dashed rgba(17, 17, 17, 0.24);
    font-size: 0.78rem;
    line-height: 1.45;
    letter-spacing: 0.01em;
    color: rgba(49, 49, 49, 0.62);
}

.project-link-icon svg {
    width: 1.75rem;
    height: 1.75rem;
    transition: transform 0.3s ease;
}

.project-link-icon:hover {
    background: rgb(17, 17, 17);
    color: #fff;
    transform: translateY(-5px) scale(1.05);
}

.project-link-icon:hover svg {
    transform: scale(1.1);
}

/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 768px) {
    .modal-close-wrap {
        top: 1.5rem;
        right: 1.5rem;
    }
    
    .hero-title-block {
        padding: 0 4vw 12vh 4vw;
    }
    
    .modal-title {
        font-size: clamp(2.5rem, 18vw, 5rem);
    }
    
    .title-line-2 {
        margin-left: 0;
        -webkit-text-stroke-width: 0.5px;
    }
    
    .modal-meta-strip {
        font-size: 0.65rem;
    }
    
    .scroll-invite {
        bottom: 5vh;
    }
    
    .overview-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .modal-overview-section {
        padding: 10vh 5vw;
    }
    
    .modal-story-section {
        padding: 12vh 5vw;
    }
    
    .modal-story-section::before {
        font-size: 20rem;
        top: 3vh;
        left: 0;
    }
    
    .floating-sticker-wrapper.sticker-1 {
        top: calc(100% - 4vh);
        right: 0;
        width: clamp(180px, 55vw, 280px);
    }
    
    .story-text {
        font-size: clamp(1.2rem, 5vw, 1.8rem);
    }
    
    .gallery-header {
        padding: 0 4vw 2rem 4vw;
        gap: 0.75rem;
        align-items: flex-start;
        flex-direction: column;
    }

    .gallery-nav-tools {
        width: 100%;
        justify-content: space-between;
    }

    .gallery-arrow-controls {
        display: none;
    }

    .gallery-dot {
        width: 1.6rem;
        height: 1.6rem;
    }

    .gallery-dot::before {
        width: 0.5rem;
        height: 0.5rem;
    }
    
    .gallery-img-wrapper {
        height: 45vh;
        max-height: 400px;
    }

    .gallery-img-wrapper.is-youtube {
        width: 92vw;
        height: auto;
        max-height: none;
    }
    
    .gallery-img-wrapper .gallery-img {
        border-radius: 4px;
    }
    
    .gallery-img-caption {
        opacity: 1;
        transform: translateY(0);
        padding: 2rem 1rem 1rem 1rem;
        font-size: 0.75rem;
    }
    
    .gallery-img {
        height: 45vh;
        max-height: 400px;
        border-radius: 4px;
    }
    
    .modal-gallery-track {
        padding: 0 4vw;
    }
    
    .modal-gallery {
        gap: 4vw;
    }
    
    .modal-end-section {
        min-height: 40vh;
        padding: 8vh 4vw;
    }
    
    .project-link-icon {
        width: 3.5rem;
        height: 3.5rem;
    }
    
    .project-link-icon svg {
        width: 1.5rem;
        height: 1.5rem;
    }

    .modal-project-disclaimer {
        font-size: 0.72rem;
        margin-top: 1.1rem;
    }
}

/* Touch device enhancements */
@media (hover: none) and (pointer: coarse) {
    .gallery-img:hover {
        transform: none;
        filter: brightness(0.9);
    }
    
    .modal-close:hover {
        background: #ffffff;
        color: #a1a1aa;
        transform: none;
    }
}
/* --- Hero 3D Card --- */
#hero-card-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
}

/* --- 3D Card & Questionnaire Styles --- */

/* Sound Prompt Modal */
#sound-prompt-modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgb(255, 255, 255);
    display: flex; justify-content: center; align-items: center;
    z-index: 2000; opacity: 0; pointer-events: none;
}
#sound-prompt-content {
    background-color: #ffffff; color: #313131;
    padding: 30px 40px; width: 320px; min-height: 300px; max-width: 90vw;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    text-align: center; border: 1px solid #000000;
}
#modal-animated-graphic { width: 80px; height: 80px; margin-bottom: 25px; }
.modal-tip { font-size: 1.1em; margin-bottom: 30px; line-height: 1.5; }
.modal-button { cursor: pointer; transition: transform 0.2s ease; padding: 8px 0; }
.modal-button:hover { transform: scale(1.05); }
#modal-accept-button { font-size: 1.6em; font-weight: bold; color: #313131; margin-bottom: 10px; }
#modal-mute-button { font-size: 0.9em; color: #333333; }

/* Skip Confirmation Modal */
#skip-confirmation-modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    display: flex; justify-content: center; align-items: center;
    z-index: 2500; opacity: 0; pointer-events: none; visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    padding: 28px;
}
#skip-confirmation-modal.show { opacity: 1; pointer-events: all; visibility: visible; }
#skip-confirmation-content {
    background-color: #ffffff; color: #313131;
    padding: 56px 60px;
    width: 100%; max-width: 760px;
    display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
    text-align: left;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    transform: scale(0.95) translateY(20px);
    transition: transform 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.04);
}
#skip-confirmation-modal.show #skip-confirmation-content { transform: scale(1) translateY(0); }
.skip-modal-message {
    margin: 0;
    font-size: 1.46rem;
    font-weight: 600;
    color: #313131;
    line-height: 1.18;
}
.skip-modal-buttons {
    margin-top: 44px;
    display: flex;
    gap: 15px;
    width: 100%;
    justify-content: flex-end;
    align-items: center;
}
.skip-modal-button {
    background: none;
    border: 1px solid transparent;
    color: #313131;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
#skip-continue-button {
    color: #ffffff;
    background: #111111;
    border-color: #111111;
    padding: 8px 18px;
    border-radius: 999px;
}
#skip-continue-button:hover {
    background: #000000;
    border-color: #000000;
    transform: translateY(-1px);
}
#skip-stay-button {
    color: #52525b;
    border-color: #e4e4e7;
    padding: 8px 16px;
    border-radius: 20px;
}
#skip-stay-button:hover {
    background: #f4f4f5;
    color: #313131;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
@media (max-width: 768px) {
    #skip-confirmation-content {
        padding: 38px 28px;
        border-radius: 1.75rem;
    }
    .skip-modal-message {
        font-size: 1.14rem;
    }
    .skip-modal-buttons {
        margin-top: 32px;
        flex-direction: column-reverse;
        align-items: stretch;
        gap: 14px;
    }
    #skip-continue-button {
        width: 100%;
        min-height: 46px;
    }
    #skip-stay-button {
        width: auto;
        min-height: 32px;
        align-self: center;
        border-color: transparent;
        background: transparent;
        box-shadow: none;
        opacity: 0.72;
        padding: 4px 10px;
        font-size: 0.78rem;
        letter-spacing: 0.08em;
    }
    #skip-stay-button:hover {
        background: transparent;
        color: #313131;
        transform: none;
        box-shadow: none;
    }
}

/* Questionnaire Intro Modal */
#questionnaire-intro-modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    display: flex; justify-content: center; align-items: center;
    z-index: 2450; opacity: 0; pointer-events: none; visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    padding: 28px;
}
#questionnaire-intro-modal.show { opacity: 1; pointer-events: auto; visibility: visible; }
#questionnaire-intro-content {
    background-color: #ffffff; color: #313131;
    padding: 56px 60px;
    width: 100%; max-width: 760px;
    display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
    text-align: left;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    transform: scale(0.95) translateY(20px);
    transition: transform 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.04);
}
#questionnaire-intro-modal.show #questionnaire-intro-content { transform: scale(1) translateY(0); }
.intro-title { margin: 0 0 16px 0; font-size: 1.46rem; font-weight: 600; color: #313131; line-height: 1.18; }
.intro-title-en,
.intro-title-zh {
    display: block;
}
.intro-body { margin: 0; font-size: 1.06rem; line-height: 1.82; color: #3f3f46; max-width: 620px; display: grid; gap: 14px; }
.intro-body-en,
.intro-body-zh { display: block; }
.intro-body-en {
    font-size: 1em;
}
.intro-body-zh { color: #52525b; }
.intro-body-zh {
    font-size: 0.9em;
    line-height: 1.72;
}
.intro-keyword {
    font-weight: 700;
    color: #313131;
}
#questionnaire-intro-actions {
    margin-top: 44px;
    display: flex;
    gap: 15px;
    width: 100%;
    justify-content: flex-end;
    align-items: center;
}
.questionnaire-intro-button {
    background: none;
    border: 1px solid transparent;
    color: #313131;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
}
.questionnaire-intro-button.primary {
    font-size: 0.875rem;
    font-weight: 600;
    color: #ffffff;
    background: #111111;
    border-color: #111111;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 8px 18px;
    border-radius: 999px;
}
.questionnaire-intro-button.primary:hover {
    background: #000000;
    border-color: #000000;
    transform: translateY(-1px);
}
.questionnaire-intro-button.secondary {
    font-size: 0.875rem;
    font-weight: 600;
    color: #52525b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid #e4e4e7;
    padding: 8px 16px;
    border-radius: 20px;
}
.questionnaire-intro-button.secondary:hover {
    background: #f4f4f5;
    color: #313131;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.questionnaire-intro-button:focus-visible {
    outline: 2px solid #111111;
    outline-offset: 2px;
}

@media (max-width: 768px) {
    #questionnaire-intro-content {
        padding: 38px 28px;
        border-radius: 1.75rem;
    }

    .intro-title {
        font-size: 1.14rem;
        color: #313131;
    }

    .intro-body {
        font-size: 0.98rem;
        line-height: 1.72;
        gap: 10px;
    }

    .intro-body-zh {
        font-size: 0.9em;
        line-height: 1.66;
    }

    #questionnaire-intro-actions {
        margin-top: 32px;
        flex-direction: column-reverse;
        align-items: stretch;
        gap: 14px;
    }

    .questionnaire-intro-button.primary {
        width: 100%;
        min-height: 46px;
    }

    .questionnaire-intro-button.secondary {
        width: auto;
        min-height: 32px;
        align-self: center;
        border-color: transparent;
        background: transparent;
        box-shadow: none;
        opacity: 0.72;
        padding: 4px 10px;
        font-size: 0.78rem;
        letter-spacing: 0.08em;
    }

    .questionnaire-intro-button.secondary:hover {
        background: transparent;
        color: #313131;
        transform: none;
        box-shadow: none;
    }
}

/* Corner Controls */
.corner-controls { position: fixed; bottom: 0; left:0; width:100%; pointer-events:none; z-index:1600; }
.corner-controls.hidden { opacity:0; transition: opacity 0.25s ease; pointer-events: none; }
.corner-controls.hidden * { pointer-events: none !important; }
.corner-controls.visible { opacity:1; transition: opacity 0.4s ease; }
.corner-link { position:absolute; bottom:18px; font-weight:200; font-size:11px; letter-spacing:0.18em; color:#999999; text-decoration:none; pointer-events:auto; user-select:none; cursor:pointer; opacity:0.9; transition:color 0.25s ease, opacity 0.25s ease, transform 0.25s ease; }
.corner-link.left { left:22px; }
.corner-link.right { right:22px; }
.corner-link:hover { color: #313131; opacity:1; transform:translateY(-1px); }

/* Overlays (Questionnaire & Result) */
.overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    z-index: 1000; display: flex; justify-content: center; align-items: center;
    transition: opacity 0.5s ease-in-out; opacity: 0; pointer-events: none;
}
.overlay.active { opacity: 1; z-index: 1001; pointer-events: auto; }

#question-container { display: none !important; }
#question-container,
#question-container *,
#questionnaire-intro-modal,
#questionnaire-intro-modal *,
#questionnaire-intro-modal button {
    cursor: none !important;
}

#questionnaire-intro-content,
#questionnaire-intro-content *,
#question-container,
#question-container *,
.question-content,
.question-top-section,
.main-question,
#question-text,
.options-container,
.option-text {
    font-family: "Ysabeau Infant", "Ysabeau", sans-serif;
}

#result-container {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: flex; justify-content: center; align-items: center;
    z-index: 2500; opacity: 0; pointer-events: none; visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    padding: 20px;
    touch-action: pan-y;
}
#result-container.active { opacity: 1; pointer-events: all; visibility: visible; }

.result-content {
    background-color: #ffffff; color: #313131;
    width: 100%; max-width: 1152px; max-height: 90vh;
    display: flex; flex-direction: row;
    border-radius: 2.5rem;
    transform: scale(0.95) translateY(20px); transition: transform 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    border: 1px solid #e4e4e7;
    position: relative;
    overflow: hidden;
    min-height: 0;
    touch-action: pan-y;
}
#result-container.active .result-content { transform: scale(1) translateY(0); }

.result-close-btn {
    position: absolute; top: 24px; right: 24px;
    width: 48px; height: 48px; border-radius: 50%;
    background-color: #ffffff; border: 1px solid #f4f4f5;
    display: flex; justify-content: center; align-items: center;
    color: #a1a1aa; cursor: pointer; z-index: 50;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.result-close-btn:hover {
    background-color: #f4f4f5; color: #313131;
}

.result-card-image-container {
    flex: 0 0 41.666%;
    background-color: #fafafa;
    padding: 48px;
    display: flex; justify-content: center; align-items: center;
    position: relative;
    border-right: 1px solid #f4f4f5;
}
.result-card-image-container::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(to bottom right, #f4f4f5, #ffffff);
}

.result-card-wrapper {
    position: relative; z-index: 10;
    width: 100%; max-width: 384px; aspect-ratio: 2/3;
    background-color: #ffffff;
    border-radius: 1rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    display: flex; justify-content: center; align-items: center;
}

.result-card-placeholder {
    width: 100%; height: 100%;
    display: flex; justify-content: center; align-items: center;
    background-color: #ffffff;
}
.placeholder-svg {
    width: 100%; height: 100%;
    object-fit: cover;
    opacity: 0.5;
}

#result-card-image {
    width: 100%; height: 100%; object-fit: cover;
    position: absolute; top: 0; left: 0;
}

.result-text-content {
    flex: 0 0 58.333%;
    padding: 48px 64px;
    display: flex; flex-direction: column;
    text-align: left;
    overflow-y: auto;
    min-height: 0;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
}

.result-header-tags { margin-bottom: 16px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.result-tag {
    padding: 6px 14px; border-radius: 9999px;
    background-color: #18181b; color: #ffffff;
    font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
}
.result-tarot-tag {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 14px; border-radius: 9999px;
    background-color: #fafafa; color: #52525b; border: 1px solid #e4e4e7;
    font-size: 0.7rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase;
}

/* Switch to dedicated Chinese typeface when result modal is in zh mode. */
.result-content.lang-zh .result-text-content,
.result-content.lang-zh .result-text-content * {
    font-family: 'ThePeakFontPlus', 'Noto Sans TC', 'PingFang TC', 'Microsoft JhengHei', sans-serif;
}

.result-language-toggle {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px;
    border: 1px solid #e4e4e7;
    border-radius: 9999px;
    background: #fafafa;
}

.result-lang-btn {
    border: 0;
    background: transparent;
    color: #71717a;
    border-radius: 9999px;
    font-size: 0.68rem;
    letter-spacing: 0.04em;
    font-weight: 700;
    padding: 5px 10px;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.result-lang-btn.active {
    background: #18181b;
    color: #ffffff;
}

.result-lang-btn:focus-visible {
    outline: 2px solid #3f3f46;
    outline-offset: 1px;
}

.result-text-content h1 { 
    margin: 0 0 12px 0; 
    font-size: clamp(2rem, 3.5vw, 3rem); 
    font-weight: 400; font-family: "Ysabeau Infant", serif; 
    color: #0f172a; line-height: 1.1; letter-spacing: -0.02em; 
}
.result-keywords {
    display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px;
}
.result-text-content #result-text { 
    font-size: 1.05rem; line-height: 1.6; color: #475569; 
    margin: 0 0 32px 0; font-weight: 300; white-space: pre-line; 
}

.result-subtitle-row {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 10px 0;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #5e5e66;
}

.result-subtitle-row svg {
    width: 13px;
    height: 13px;
    flex: 0 0 auto;
}

.quote-subtitle-row {
    margin: 0 0 10px 0;
}

.result-quote-section {
    position: relative;
    padding: 24px 32px 24px 32px;
    margin-top: 16px;
    margin-bottom: 32px;
    background-color: #fafafa;
    border-left: 4px solid #18181b;
    border-radius: 0 1rem 1rem 0;
}
.result-quote-section .quote-icon {
    position: absolute;
    top: 16px; left: 16px;
    color: #d4d4d8; opacity: 0.4;
    width: 48px; height: 48px;
}
.result-quote-section .quote-content {
    position: relative; z-index: 1; margin-left: 20px;
}
.result-quote-text {
    font-family: inherit; font-size: 1.15rem; font-style: italic; line-height: 1.6; color: #18181b;
    margin: 0 0 12px 0; font-weight: 300;
}
.result-quote-author {
    margin: 0;
    font-size: 0.8rem; color: #71717a; font-weight: 500; text-transform: uppercase; letter-spacing: 0.1em;
}

.result-details-section { margin-bottom: 24px; }
.section-title {
    font-size: 0.7rem; font-weight: 700; color: #71717a;
    text-transform: uppercase; letter-spacing: 0.15em;
    margin: 0 0 12px 0; display: flex; align-items: center; gap: 8px;
}
.section-title svg {
    width: 13px;
    height: 13px;
    flex: 0 0 auto;
}
.section-line { width: 24px; height: 1px; background-color: #d4d4d8; display: block; }

.result-philosophy { 
    background-color: #ffffff; border: 1px solid #e4e4e7; 
    padding: 24px; border-radius: 1rem; 
}
.philosophy-concept { font-weight: 600; font-family: "Ysabeau Infant", serif; margin: 0 0 8px 0; font-size: 1.15rem; color: #18181b; }
.philosophy-explanation { margin: 0; font-size: 0.95rem; line-height: 1.6; color: #52525b; font-weight: 400; }

/* Philosophy Radar Chart */
.result-philosophy-triangles {
    display: block;
    margin: 12px 0 6px 0;
    flex: 0 0 auto;
}

.philosophy-radar-wrap {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* SVG fills the wrap a�ᡨ no canvas wrapper needed */
.philosophy-radar-svg {
    width: 100%;
    max-width: 420px;
    display: block;
    overflow: visible;          /* labels outside viewBox are never clipped */
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.06));
}

.phi-radar-grid {
    fill: none;
    stroke: rgba(100, 116, 139, 0.18);
    stroke-width: 1;
}

.phi-radar-axis {
    stroke: rgba(100, 116, 139, 0.22);
    stroke-width: 1;
}

.phi-radar-axis-dot {
    fill: rgba(100, 116, 139, 0.32);
    stroke: none;
}

.phi-radar-area {
    fill: rgba(15, 23, 42, 0.10);
    stroke: rgba(15, 23, 42, 0.8);
    stroke-width: 1.5;
    stroke-linejoin: round;
}

.phi-radar-outline {
    fill: none;
    stroke: rgba(15, 23, 42, 0.88);
    stroke-width: 2;
    stroke-linejoin: round;
}

.phi-radar-vertex-dot {
    fill: #18181b;
    stroke: #ffffff;
    stroke-width: 1.5;
}

/* Dashed connector from radar edge to label */
.phi-radar-connector {
    stroke: rgba(100, 116, 139, 0.28);
    stroke-width: 1;
    stroke-dasharray: 2 2;
}

/* SVG text labels a�ᡨ pulled to 1.55A�X radius, never clipped */
.phi-radar-label-g {
    /* opacity animated in JS */
}

.phi-radar-name-text {
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    fill: #52525b;
}

.phi-radar-pct-text {
    font-size: 22px;
    font-weight: 800;
    fill: #313131;
    letter-spacing: -0.02em;
}

@media (max-width: 640px) {
    .philosophy-radar-svg {
        max-width: 340px;
    }
    .phi-radar-name-text {
        font-size: 13px;
    }
    .phi-radar-pct-text {
        font-size: 19px;
    }
}

@media (min-width: 641px) {
    .result-philosophy-triangles {
        min-height: 0;
    }
}


.result-soul-portrait-container {
    background-color: #fafafa; border: 1px solid #e4e4e7; 
    padding: 24px; border-radius: 1rem;
}
.result-soul-portrait { 
    font-family: inherit; font-weight: 400;
    color: #52525b; margin: 0; font-size: 0.95rem; line-height: 1.6; 
}

/* Matching Grid UX styling */
.result-matching-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 12px;
}

@media (max-width: 600px) {
    .result-matching-grid {
        grid-template-columns: 1fr;
    }
}

.matching-box {
    background-color: #fafafa;
    border: 1px solid #e4e4e7;
    padding: 20px;
    border-radius: 1rem;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.matching-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.matching-title svg {
    width: 12px;
    height: 12px;
    flex: 0 0 auto;
}

.match-positive { color: #313131; }
.match-positive::before {
    content: "+";
    color: #313131;
    font-size: 0.6rem;
}

.match-negative { color: #4a4a4a; }
.match-negative::before {
    content: "-";
    color: #4a4a4a;
    font-size: 0.6rem;
}

.matching-types {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.matching-type-pill {
    background-color: #ffffff;
    border: 1px solid #d4d4d8;
    color: #3f3f46;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.matching-reason {
    font-size: 0.85rem;
    line-height: 1.5;
    color: #52525b;
    margin: 0;
    font-style: italic;
    margin-top: auto;
}

.result-keyword-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 6px;
    background-color: #f4f4f5;
    color: #52525b;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    line-height: 1;
}

#result-actions { display: flex; gap: 15px; width: 100%; justify-content: space-between; margin-top: 32px; padding-top: 24px; border-top: 1px solid #f4f4f5; }
.result-note {
    margin-top: 20px;
    font-size: 0.68rem;
    color: #a1a1aa;
    letter-spacing: 0.04em;
    text-align: center;
    opacity: 0.75;
}
.result-button { background: none; border: none; color: #313131; cursor: pointer; transition: all 0.3s ease; padding: 8px 0; font-family: inherit; display: flex; align-items: center; gap: 8px; }
.result-button.primary { font-size: 0.875rem; font-weight: 600; color: #52525b; text-transform: uppercase; letter-spacing: 0.05em; }
.result-button.primary:hover { color: #313131; transform: translateX(4px); }
.result-button.secondary { font-size: 0.875rem; font-weight: 600; color: #52525b; text-transform: uppercase; letter-spacing: 0.05em; border: 1px solid #e4e4e7; padding: 8px 16px; border-radius: 20px; transition: all 0.3s; }
.result-button.secondary:hover { background: #f4f4f5; color: #313131; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.05); }

/* Share Card Hidden Layout */
#share-card-container {
    position: absolute;
    top: -9999px;
    left: -9999px;
    width: 600px;
    height: 1066px;
    background: #ffffff;
    pointer-events: none;
    z-index: -100;
    overflow: hidden;
    font-family: inherit;
    color: #313131;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.share-card-content {
    position: relative;
    z-index: 1;
    padding: 38px 38px 26px;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-sizing: border-box;
    gap: 14px;
}

.share-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.share-card-tag {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #313131;
    border: 1px solid #d8d8d8;
    padding: 7px 14px;
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.share-card-tarot {
    font-size: 14px;
    font-weight: 600;
    color: #313131;
    display: flex;
    align-items: center;
    gap: 8px;
}

.share-card-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 206px;
    gap: 18px;
    align-items: start;
}

.share-card-title {
    font-size: 58px;
    font-weight: 800;
    line-height: 0.97;
    margin: 0;
    color: #313131;
    letter-spacing: -0.025em;
}

.share-card-subtitle {
    margin: 10px 0 0;
    font-size: 15px;
    line-height: 1.4;
    color: #2c2c2c;
    max-width: 318px;
}

.share-card-keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.share-card-keyword {
    background: #111111;
    color: #ffffff;
    border: none;
    padding: 7px 14px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.share-card-mini-card {
    position: relative;
    width: 206px;
    height: 220px;
}

.share-card-mini-card svg {
    display: block;
    width: 100%;
    height: 100%;
}

.share-card-mini-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding: 0 12px 18px;
    text-align: center;
}

.share-card-mini-label {
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #3a3a3a;
    font-weight: 700;
}

.share-card-mini-title {
    margin-top: 6px;
    font-size: 21px;
    font-weight: 800;
    line-height: 1.05;
    color: #313131;
}

.share-card-mini-tarot {
    margin-top: 4px;
    font-size: 12px;
    color: #3a3a3a;
    letter-spacing: 0.05em;
}

.share-card-section-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 800;
    color: #2a2a2a;
    margin-bottom: 8px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.share-card-section-title svg {
    width: 13px;
    height: 13px;
    flex: 0 0 auto;
}

.share-card-quote-title {
    margin-top: 2px;
    margin-bottom: 6px;
}

.share-card-description-block {
    margin-top: 2px;
}

.share-card-description {
    font-size: 16px;
    line-height: 1.52;
    color: #1f1f1f;
    background: rgba(255, 255, 255, 0.75);
    padding: 18px 18px 19px;
    border-radius: 14px;
    border: 1px solid rgba(215, 215, 215, 0.95);
}

.share-card-insights {
    margin-top: 4px;
}

.share-card-signature-svg {
    width: 100%;
    height: 156px;
    display: block;
}

.share-card-signature-svg .share-card-sig-label {
    fill: #1f1f1f;
    font-size: 14px;
    font-weight: 700;
}

.share-card-signature-svg .share-card-sig-track {
    fill: #e9e9e9;
}

.share-card-signature-svg .share-card-sig-fill {
    fill: #313131;
}

.share-card-signature-svg .share-card-sig-value {
    fill: #313131;
    font-size: 14px;
    font-weight: 700;
}

.share-card-quote {
    font-size: 18px;
    line-height: 1.45;
    font-style: italic;
    color: #313131;
    position: relative;
    padding-left: 16px;
    border-left: 3px solid #111111;
    margin-top: 2px;
}

.share-card-quote-author {
    font-size: 14px;
    font-weight: 600;
    color: #3a3a3a;
    margin-top: 7px;
    font-style: normal;
}

.share-card-matches {
    display: flex;
    gap: 12px;
    margin-top: 6px;
}

.match-group {
    flex: 1;
    background: rgba(255, 255, 255, 0.7);
    padding: 14px;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(215, 215, 215, 0.9);
}

.match-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.13em;
    font-weight: 800;
    color: #1f1f1f;
    margin-bottom: 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.match-label svg {
    width: 12px;
    height: 12px;
    flex: 0 0 auto;
}

.match-items {
    display: flex;
    flex-direction: column;
    gap: 7px;
    width: 100%;
}

.match-item {
    font-size: 12px;
    font-weight: 600;
    padding: 8px 10px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    box-sizing: border-box;
    text-transform: none;
    letter-spacing: 0.015em;
}

.match-item.best-match {
    background: #efefef;
    color: #313131;
}

.match-item.challenging-match {
    background: #f4f4f4;
    color: #303030;
}

.match-item.none-match {
    background: #f5f5f5;
    color: #555555;
}

.share-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 11px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.share-card-footer-branding {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.share-card-brand-name {
    font-size: 16px;
    font-weight: 800;
    color: #313131;
    letter-spacing: 0.01em;
}

.share-card-brand-url {
    font-size: 11px;
    color: #3d3d3d;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.share-card-qr {
    width: 52px;
    height: 52px;
    border-radius: 8px;
    background: #fff;
    padding: 5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.14);
}

.share-card-qr img,
.share-card-qr canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

/* a����a����a���� Result Modal a�ᡧ Mobile Layout a����a����a����a����a����a����a����a����a����a����a����a����a����a����a����a����a����a����a����a����a����a����a����a����a����a����a����a����a����a����a����a����a����a����a����a����a����a����a����a���� */

/* Tablets and below: switch to single-column (never two-column) */
@media (max-width: 768px) {
    #result-container {
        padding: 16px 12px 12px;    /* side + bottom gap so content never touches device edges */
        align-items: flex-end;      /* bottom-sheet feel */
        touch-action: pan-y;
    }

    .result-content {
        flex-direction: column;     /* stack: card image a?�� text, never side-by-side */
        max-width: 100%;
        width: 100%;
        /* Use a fixed height so the browser knows it overflows and scroll kicks in */
        height: 92dvh;
        max-height: 92dvh;
        border-radius: 1.5rem;
        /* Override base overflow:hidden a�ᡨ enable vertical scroll */
        overflow: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-y: contain;
        touch-action: pan-y;        /* prevent body touch-action:none from blocking scroll */
    }

    .result-card-image-container {
        flex: 0 0 auto;
        border-right: none;
        border-bottom: 1px solid #f4f4f5;
        padding: 40px 24px 24px;    /* extra top padding so close btn doesn't overlap */
        min-height: unset;
        z-index: 0;
    }

    .result-card-image-container::before {
        background: linear-gradient(to bottom, #f4f4f5, #ffffff);
    }

    .result-card-wrapper {
        max-width: 130px;
    }

    .result-text-content {
        flex: 1 1 auto;
        overflow-y: visible;        /* parent (.result-content) handles scroll */
        padding: 28px 24px 48px;
        min-height: unset;
        touch-action: pan-y;
    }

    /* Mobile header-tags: Row 1 = YOUR RESULT + lang toggle, Row 2 = tarot tag */
    .result-header-tags {
        align-items: center;
    }

    .result-tag {
        order: 1;
        flex-shrink: 0;
    }

    .result-language-toggle {
        order: 2;
        width: auto;      /* override the desktop width: auto a�ᡨ keep it from going full-width */
        margin-left: auto;
        flex-shrink: 0;
    }

    .result-tarot-tag {
        order: 3;
        width: 100%;      /* push onto its own row */
        margin-top: 2px;
    }

    .result-text-content h1 {
        font-size: clamp(1.75rem, 6vw, 2.25rem);
    }

    #result-actions {
        flex-direction: column;
        gap: 10px;
    }

    #result-actions .result-button {
        width: 100%;
        justify-content: center;
    }
}

/* Small phones */
@media (max-width: 480px) {
    #result-container {
        padding: 12px 8px 8px;
    }

    .result-card-wrapper {
        max-width: 100px;
    }

    .result-text-content {
        padding: 24px 20px 44px;
    }

    .result-text-content h1 { font-size: 1.75rem; }

    .result-quote-section {
        padding: 20px;
    }
}

/* Canvas Cursor */
#hero-3d-container canvas,
#hero-3d-container canvas.hoverable {
    cursor: none !important;
    transition: cursor 0.1s ease;
}


/* --- Section 3: Kinetic Works Flow --- */
#kinetic-works-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none; /* Allow click-through to items if needed, but items will have pointer-events: auto */
}

.kinetic-work-item {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: auto;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.3s ease, transform 0.3s ease;
    will-change: transform;
}

.kinetic-work-item:hover {
    opacity: 1;
    z-index: 10;
}

.kinetic-work-img {
    width: 200px;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.5s ease;
}

.kinetic-work-item:hover .kinetic-work-img {
    transform: scale(1.05);
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}

.kinetic-work-title {
    margin-top: 1rem;
    font-family: var(--font-flex);
    font-weight: 600;
    font-size: 1rem;
    color: var(--text);
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.kinetic-work-item:hover .kinetic-work-title {
    opacity: 1;
    transform: translateY(0);
}

.kinetic-overlay-text {
    position: absolute;
    z-index: 0;
    text-align: center;
    opacity: 0.1;
    pointer-events: none;
}

.kinetic-overlay-text h2 {
    font-family: var(--font-flex);
    font-size: 15vw;
    line-height: 0.8;
    font-weight: 800;
    text-transform: uppercase;
}

/* Floating poetic text fragments */
.poetic-fragment {
    position: absolute;
    font-family: var(--font-main);
    font-size: 1.2rem;
    font-style: italic;
    color: var(--accent);
    opacity: 0.6;
    pointer-events: none;
    white-space: nowrap;
    z-index: 0;
}


/* --- Works Flow Section --- */
#works-flow-wrapper {
    width: 100%;
    height: 100vh;
    position: relative;
    overflow: hidden;
    /* Ensure it sits nicely */
    margin-top: -10vh; /* Overlap slightly with text if needed */
    /* Removed dark background to respect section color */
}

#works-flow-wrapper canvas {
    position: absolute;
    inset: 0;
}

/* Works Flow Modal */
#works-flow-modal {
    backdrop-filter: blur(10px);
}

#works-flow-modal h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

#works-flow-modal p {
    font-size: 1rem;
    color: #333;
}

#wf-close {
    transition: transform 0.3s ease;
}

#wf-close:hover {
    transform: rotate(90deg);
}

/* Works Flow subtle tips */
#works-flow-wrapper {
    width: 100%;
    height: 100vh;
    position: relative;
    overflow: hidden;
    z-index: 1;
    touch-action: pan-y pinch-zoom;
}

#works-flow-wrapper[data-flow-mode="fallback"] canvas {
    display: none;
}

#works-flow-wrapper[data-flow-mode="fallback"]::after {
    content: "Interactive 3D is simplified on this device. Explore works in the archive below.";
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(92vw, 560px);
    padding: 1rem 1.2rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.88);
    color: #313131;
    text-align: center;
    font-family: var(--font-main);
    font-size: 0.95rem;
    line-height: 1.4;
    z-index: 2;
    backdrop-filter: blur(5px);
}

.wf-hints {
    position: fixed;
    left: 50%;
    bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%) translateY(8px);
    z-index: 2;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
}

#works-flow-wrapper[data-tip-visible="true"] .wf-hints {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.wf-hint-shell {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.35rem 0.65rem;
    width: min(92vw, 900px);
    max-width: 900px;
    text-align: center;
    min-height: 1.8rem;
    padding: 0.5rem 0.85rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    backdrop-filter: blur(5px);
    pointer-events: none;
}

.wf-hint-text {
    font-family: 'Ysabeau', sans-serif;
    font-size: 1.05rem;
    color: #313131;
    line-height: 1.2;
    white-space: normal;
    text-align: center;
    display: none;
    max-width: 860px;
    opacity: 0;
    clip-path: inset(0 100% 0 0);
    transform: translateY(4px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

#works-flow-wrapper[data-tip-state="idle"] .wf-hint-text[data-tip="idle"],
#works-flow-wrapper[data-tip-state="focus"] .wf-hint-text[data-tip="focus"] {
    display: inline-block;
    opacity: 0.92;
    transform: translateY(0);
    clip-path: inset(0 0 0 0);
    animation: handwrite-focus 1.4s ease-out forwards;
}

#works-flow-wrapper[data-tip-state="focus"] .wf-hint-shell {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    backdrop-filter: blur(5px);
}

/* --- Selected Design Archive --- */
.work-archive {
    width: 100%;
    position: relative;
    z-index: 3;
    background: #f7f7f5;
    color: #050505;
    border-top: 1px solid #111111;
    border-bottom: 1px solid #111111;
    font-family: var(--font-main);
    font-variation-settings: 'wght' 430;
}

.work-archive-hero {
    min-height: 92vh;
    position: relative;
    overflow: hidden;
    padding: clamp(1rem, 2vw, 2rem);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-bottom: 1px solid #111111;
}

.work-archive-kicker,
.work-archive-intro,
.work-archive-filter-row,
.work-archive-row-main {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 0.75rem;
}

.work-archive-kicker {
    position: relative;
    z-index: 2;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.3em;
    line-height: 1.35;
    text-transform: uppercase;
}

.work-archive-kicker span:first-child {
    grid-column: span 6;
}

.work-archive-kicker span:last-child {
    grid-column: span 6;
    text-align: right;
}

.work-archive-title-wrap {
    position: relative;
    z-index: 2;
}

.work-archive-title-wrap h2 {
    max-width: 18ch;
    font-family: var(--font-main);
    font-size: clamp(5.5rem, 19vw, 16rem);
    font-weight: 650;
    font-variation-settings: 'wght' 650;
    letter-spacing: -0.12em;
    line-height: 0.72;
}

.work-archive-intro {
    margin-top: clamp(1.5rem, 4vw, 3rem);
    padding-top: 1rem;
    border-top: 1px solid #111111;
}

.work-archive-intro p:first-child {
    grid-column: span 4;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.3em;
    line-height: 1.35;
    text-transform: uppercase;
}

.work-archive-intro p:last-child {
    grid-column: span 5;
    font-size: clamp(1.05rem, 1.6vw, 1.45rem);
    font-weight: 550;
    line-height: 1.12;
}

.work-archive-marquee {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    border-top: 1px solid #111111;
    border-bottom: 1px solid #111111;
    background: rgba(247, 247, 245, 0.78);
    color: #c8c8c8;
    pointer-events: none;
    overflow: hidden;
}

.work-archive-marquee-track {
    display: flex;
    width: max-content;
    white-space: nowrap;
    font-family: var(--font-flex);
    font-size: clamp(4rem, 9vw, 9rem);
    font-style: italic;
    font-weight: 850;
    letter-spacing: 0;
    line-height: 0.95;
    animation: work-archive-marquee 18s linear infinite;
}

@keyframes work-archive-marquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

.work-archive-filter-row {
    padding: 1rem clamp(1rem, 2vw, 2rem);
    align-items: start;
}

.work-archive-filter-row > p {
    grid-column: span 3;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: #666666;
}

.work-archive-filters {
    grid-column: span 9;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.work-archive-filter {
    appearance: none;
    background: #ffffff;
    color: #050505;
    border: 1px solid #111111;
    padding: 0.65rem 0.9rem;
    font-family: var(--font-main);
    font-size: 0.72rem;
    font-weight: 800;
    font-variation-settings: 'wght' 760;
    letter-spacing: 0.22em;
    line-height: 1;
    text-transform: uppercase;
    transition: background 0.2s ease, color 0.2s ease, transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.work-archive-filter:hover {
    transform: translateY(-2px);
}

.work-archive-filter:hover,
.work-archive-filter.is-active {
    background: #050505;
    color: #ffffff;
}

.work-archive-list {
    border-top: 1px solid #111111;
}

.work-archive-grid-section {
    max-width: min(860px, calc(100% - 16vw));
    margin: clamp(2.2rem, 5vw, 3.4rem) auto clamp(3rem, 6vw, 5rem);
    overflow-anchor: none;
}

.work-archive-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(0.75rem, 1.5vw, 1.15rem);
}

.work-archive-grid-item {
    min-width: 0;
    contain: layout paint;
}

.work-archive-grid-media-wrap {
    width: 100%;
    aspect-ratio: 1 / 1;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    cursor: pointer;
    overflow: hidden;
}

.work-archive-grid-media {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}

.work-archive-grid-placeholder {
    width: 100%;
    height: 100%;
    background: transparent;
}

.work-archive-grid-meta {
    margin-top: 0.55rem;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.7rem;
}

.work-archive-grid-item h3 {
    margin: 0;
    font-family: var(--font-main);
    font-size: clamp(0.9rem, 1.35vw, 1.08rem);
    font-weight: 520;
    font-variation-settings: 'wght' 520;
    letter-spacing: 0;
    line-height: 1.3;
    color: #222222;
    text-align: left;
    cursor: pointer;
}

.work-archive-grid-arrow {
    flex: 0 0 auto;
    width: 2.6rem;
    height: 2.6rem;
    border: none;
    background: transparent;
    color: #2b2b2b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
}

.work-archive-grid-arrow span {
    display: inline-block;
    font-size: 1.55rem;
    line-height: 1;
    transform: translate(0, 0);
    transition: transform 360ms cubic-bezier(0.22, 1, 0.36, 1), opacity 260ms ease;
    opacity: 0.88;
}

.work-archive-grid-item:hover .work-archive-grid-arrow span,
.work-archive-grid-item:focus-within .work-archive-grid-arrow span {
    transform: translate(4px, -4px);
    opacity: 1;
}

.media-loading-shell {
    position: relative;
    overflow: hidden;
    background: linear-gradient(110deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.62) 45%, rgba(255,255,255,0) 72%), #ececea;
    background-size: 220% 100%, auto;
    isolation: isolate;
}

.media-loading-shell.is-loading {
    animation: media-loading-sheen 1.45s ease-in-out infinite;
}

.media-loading-shell.is-loaded,
.media-loading-shell.is-error {
    background: transparent;
    animation: none;
}

.media-loading-shell > img,
.media-loading-shell > video,
.media-loading-shell > iframe {
    opacity: 0;
    transition: opacity 340ms ease, filter 340ms ease;
}

.media-loading-shell.is-loaded > img,
.media-loading-shell.is-loaded > video,
.media-loading-shell.is-loaded > iframe,
.media-loading-shell.is-error > img,
.media-loading-shell.is-error > video,
.media-loading-shell.is-error > iframe {
    opacity: 1;
}

.media-loading-indicator {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.28rem;
    pointer-events: none;
    color: rgba(17, 17, 17, 0.58);
    transition: opacity 220ms ease;
}

.media-loading-shell.is-loaded .media-loading-indicator,
.media-loading-shell.is-error .media-loading-indicator {
    opacity: 0;
}

.media-loading-indicator span {
    width: 0.34rem;
    height: 0.34rem;
    border-radius: 50%;
    background: currentColor;
    animation: media-loading-dot 0.9s ease-in-out infinite;
}

.media-loading-indicator span:nth-child(2) {
    animation-delay: 0.12s;
}

.media-loading-indicator span:nth-child(3) {
    animation-delay: 0.24s;
}

@keyframes media-loading-sheen {
    0% { background-position: 180% 0, 0 0; }
    100% { background-position: -80% 0, 0 0; }
}

@keyframes media-loading-dot {
    0%, 100% { opacity: 0.32; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(-0.22rem); }
}
.archive-float-overlay {
    position: fixed;
    inset: 0;
    z-index: 1700;
    pointer-events: none;
    opacity: 0;
    transition: opacity 280ms ease;
}

.archive-float-overlay.is-visible {
    opacity: 1;
}

.archive-float-line {
    position: fixed;
    top: 0;
    left: 0;
    height: 1px;
    background: rgba(17, 17, 17, 0.35);
    transform-origin: 0 50%;
    pointer-events: none;
}

.archive-float-window {
    position: fixed;
    left: -9999px;
    top: -9999px;
    right: auto;
    bottom: auto;
    width: min(360px, calc(100vw - 2.4rem));
    max-height: min(72vh, 640px);
    overflow: auto;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid #313131;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.16);
    backdrop-filter: blur(8px);
    pointer-events: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    cursor: none;
    opacity: 0;
    transform: translateY(10px) scale(0.98);
    transition: opacity 280ms ease, transform 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

.archive-float-window.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.archive-float-header {
    position: sticky;
    top: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    border-bottom: 1px solid #313131;
    padding: 0.55rem 0.9rem;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(3px);
    cursor: none;
    user-select: none;
}

.archive-float-header:active {
    cursor: none;
}

.archive-float-header > span {
    min-height: 0.95rem;
    min-width: 0.5rem;
    font-size: 0.64rem;
    font-weight: 760;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #676767;
}

.archive-float-close {
    border: 0;
    background: transparent;
    color: #575757;
    text-align: right;
    padding: 0;
    font-size: 0.64rem;
    font-weight: 760;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    cursor: none;
}

.archive-float-content {
    padding: 1.25rem 1.35rem 1.5rem;
    cursor: none;
}

.archive-float-media-wrap {
    width: 100%;
    aspect-ratio: 4 / 3;
    border: 1px solid rgba(17, 17, 17, 0.18);
    background: #ffffff;
}

.archive-float-media {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.archive-float-media-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.84rem;
    letter-spacing: 0.04em;
    color: #7a7a7a;
}

.archive-float-meta {
    margin-top: 1.15rem;
}

.archive-float-section {
    margin-top: 1.45rem;
}

.archive-float-section h4 {
    margin: 0 0 0.68rem;
    font-size: 0.64rem;
    font-weight: 760;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #6b6b6b;
}

.archive-float-section-header {
    display: flex;
    align-items: baseline;
    justify-content: flex-start;
    gap: 0.8rem;
    margin-bottom: 0.68rem;
}

.archive-float-section-header h4 {
    margin-bottom: 0;
}

.archive-float-section-toggle {
    flex: 0 0 auto;
    border: 1px solid rgba(17, 17, 17, 0.22);
    background: transparent;
    padding: 0.28rem 0.58rem;
    font-size: 0.62rem;
    font-weight: 760;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #575757;
    cursor: none;
}

.archive-float-section-toggle:hover,
.archive-float-section-toggle[aria-expanded="true"] {
    border-color: rgba(17, 17, 17, 0.48);
    color: #202020;
}

.archive-float-section-toggle [data-close-label],
.archive-float-section-toggle[aria-expanded="true"] [data-open-label] {
    display: none;
}

.archive-float-section-toggle[aria-expanded="true"] [data-close-label] {
    display: inline;
}

.archive-float-section-body {
    margin-top: 0.7rem;
}

.archive-float-section p {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.72;
    color: #2f2f2f;
    white-space: pre-wrap;
}

.archive-float-list {
    margin: 0.18rem 0 0;
    padding-left: 1.15rem;
    font-size: 0.8rem;
    line-height: 1.72;
    color: #2f2f2f;
}

.archive-float-list li + li {
    margin-top: 0.35rem;
}

.archive-float-links {
    margin-top: 0.75rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.archive-float-links a {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(17, 17, 17, 0.26);
    padding: 0.32rem 0.6rem;
    font-size: 0.62rem;
    font-weight: 740;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #343434;
    text-decoration: none;
    cursor: none;
}

.archive-float-gallery {
    margin-top: 1rem;
    display: grid;
    gap: 1rem;
}

.archive-float-gallery-item {
    margin: 0;
    border: 1px solid rgba(17, 17, 17, 0.16);
    background: #ffffff;
}

.archive-float-gallery-item figcaption {
    border-top: 1px solid rgba(17, 17, 17, 0.12);
    padding: 0.55rem 0.65rem;
    font-size: 0.72rem;
    line-height: 1.5;
    color: #4a4a4a;
}

.archive-float-gallery-media {
    width: 100%;
    max-height: 220px;
    display: block;
    object-fit: contain;
    background: #ffffff;
}

.archive-float-gallery-youtube {
    aspect-ratio: 16 / 9;
    max-height: none;
    border: 0;
    background: #000;
}

.archive-float-disclaimer {
    margin: 1.5rem 0 0;
    padding-top: 1.1rem;
    border-top: 1px dashed rgba(17, 17, 17, 0.24);
    font-size: 0.74rem;
    line-height: 1.65;
    letter-spacing: 0.01em;
    color: rgba(49, 49, 49, 0.62);
}

.archive-float-window::-webkit-scrollbar {
    width: 15px;
}

.archive-float-window::-webkit-scrollbar-track {
    background: #ececec;
    border-left: 1px solid #c6c6c6;
}

.archive-float-window::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #555555 0%, #313131 100%);
    border: 2px solid #ececec;
    border-radius: 999px;
}

.archive-float-window::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #3f3f3f 0%, #202020 100%);
}

.archive-float-window {
    scrollbar-width: auto;
    scrollbar-color: #313131 #ececec;
}

.archive-float-dragging,
.archive-float-dragging * {
    cursor: none !important;
    user-select: none !important;
}

.archive-float-eyebrow {
    margin: 0;
    font-size: 0.63rem;
    font-weight: 760;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: #6b6b6b;
}

.archive-float-meta h3 {
    margin: 0.55rem 0 0;
    font-family: var(--font-main);
    font-size: 1.25rem;
    font-weight: 600;
    font-variation-settings: 'wght' 600;
    letter-spacing: -0.02em;
    line-height: 1.08;
}

.archive-float-meta p {
    margin: 0.65rem 0 0;
    font-size: 0.82rem;
    line-height: 1.68;
    color: #3c3c3c;
}

.archive-float-stats {
    margin-top: 0.9rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.archive-float-stats span {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(17, 17, 17, 0.2);
    padding: 0.32rem 0.6rem;
    font-size: 0.62rem;
    font-weight: 740;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #4f4f4f;
}

.work-archive-list.is-filter-animating .work-archive-row.is-entering {
    opacity: 0;
    transform: translateY(18px);
    animation: work-archive-row-enter 0.52s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: var(--archive-row-delay, 0ms);
    will-change: opacity, transform;
}

@keyframes work-archive-row-enter {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.work-archive-row {
    background: #ffffff;
    border-bottom: 1px solid #111111;
}

.work-archive-row-toggle {
    width: 100%;
    display: block;
    appearance: none;
    background: transparent;
    color: inherit;
    border: 0;
    padding: 0;
    font-family: var(--font-main);
    text-align: left;
}

.work-archive-row-main {
    width: 100%;
    padding: clamp(0.95rem, 1.6vw, 1.6rem) clamp(1rem, 2vw, 2rem);
    align-items: start;
    transition: background 0.2s ease, color 0.2s ease;
}

.work-archive-row-toggle:hover .work-archive-row-main,
.work-archive-row.is-open .work-archive-row-main {
    background: #050505;
    color: #ffffff;
}

.work-archive-number {
    grid-column: span 1;
    font-size: 0.74rem;
    font-weight: 800;
    font-variation-settings: 'wght' 760;
    letter-spacing: 0.3em;
    text-transform: uppercase;
}

.work-archive-title {
    grid-column: span 6;
    font-family: var(--font-main);
    font-size: clamp(2.8rem, 7vw, 8rem);
    font-weight: 680;
    font-variation-settings: 'wght' 680;
    letter-spacing: -0.08em;
    line-height: 0.86;
    overflow-wrap: anywhere;
}

.work-archive-meta {
    grid-column: span 2;
}

.work-archive-year {
    grid-column: span 1;
}

.work-archive-meta,
.work-archive-year {
    font-size: 0.72rem;
    font-weight: 800;
    font-variation-settings: 'wght' 760;
    letter-spacing: 0.24em;
    line-height: 1.35;
    text-transform: uppercase;
}

.work-archive-plus {
    grid-column: span 2;
    display: flex;
    justify-content: flex-end;
}

.work-archive-plus span {
    width: 2.75rem;
    aspect-ratio: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid currentColor;
    font-size: 1.35rem;
    line-height: 1;
}

.work-archive-row.is-open .work-archive-plus span {
    font-size: 0;
}

.work-archive-row.is-open .work-archive-plus span::before {
    content: "";
    width: 1rem;
    border-top: 1px solid currentColor;
}

.work-archive-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 3.5rem 0;
    padding: 0 clamp(1rem, 2vw, 2rem) 0;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    pointer-events: none;
    transition:
        max-height 0.52s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.3s ease,
        padding-bottom 0.45s cubic-bezier(0.22, 1, 0.36, 1),
        grid-template-columns 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.work-archive-row.is-open .work-archive-panel {
    max-height: 2400px;
    opacity: 1;
    padding-bottom: clamp(1rem, 2.4vw, 2rem);
    pointer-events: auto;
}

.work-archive-row.is-more-open .work-archive-panel {
    grid-template-columns: minmax(0, 1fr) 3.5rem minmax(260px, min(360px, 34vw));
}

@keyframes work-archive-panel-open {
    from {
        opacity: 0;
        transform: translateY(-18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.work-archive-primary {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(220px, 4fr) minmax(0, 8fr);
    gap: clamp(0.9rem, 1.6vw, 1.5rem);
    padding-top: clamp(0.9rem, 1.8vw, 1.5rem);
    padding-right: clamp(1rem, 2vw, 2rem);
    transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.work-archive-row.is-more-open .work-archive-primary {
    transform: translateX(-1.35rem);
}

.work-archive-media {
    border: 1px solid #111111;
    padding: 0.75rem;
    align-self: start;
}

.work-archive-media img,
.work-archive-media video,
.work-archive-placeholder {
    width: 100%;
    aspect-ratio: 4 / 5;
    display: block;
    object-fit: cover;
    object-position: center;
    filter: grayscale(1);
    background: #eeeeee;
}

.work-archive-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    text-align: center;
    font-family: var(--font-main);
    font-size: clamp(2rem, 4vw, 4.5rem);
    font-weight: 620;
    font-variation-settings: 'wght' 620;
    letter-spacing: -0.08em;
    line-height: 0.88;
    color: #777777;
}

.work-archive-detail {
    min-width: 0;
}

.work-archive-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: clamp(1rem, 2vw, 2rem);
    color: #666666;
}

.work-archive-stats span {
    font-size: 0.72rem;
    font-weight: 800;
    font-variation-settings: 'wght' 760;
    letter-spacing: 0.22em;
    line-height: 1.35;
    text-transform: uppercase;
}

.work-archive-more-btn {
    grid-column: 2;
    background: transparent;
    border: none;
    border-left: 1px solid #111111;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-family: var(--font-main);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #313131;
    margin-top: clamp(0.9rem, 1.8vw, 1.5rem);
    transition: background 0.3s ease, color 0.3s ease;
}

.work-archive-more-btn:hover {
    background: #111;
    color: #eee;
}

.work-archive-desc {
    max-width: 40ch;
    font-family: var(--font-main);
    font-size: clamp(2.8rem, 5.2vw, 6rem);
    font-weight: 620;
    font-variation-settings: 'wght' 620;
    letter-spacing: -0.055em;
    line-height: 0.95;
}

.work-archive-story {
    max-width: 42rem;
    margin-top: 1.5rem;
    color: #555555;
    font-size: clamp(1rem, 1.3vw, 1.18rem);
    font-variation-settings: 'wght' 450;
    line-height: 1.5;
}

.work-archive-notes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.work-archive-notes div {
    min-width: 0;
    border: 1px solid #111111;
    padding: 1rem;
}

.work-archive-notes p,
.work-archive-more-eyebrow,
.work-archive-more-block p {
    margin-bottom: 0.75rem;
    color: #666666;
    font-size: 0.72rem;
    font-weight: 800;
    font-variation-settings: 'wght' 760;
    letter-spacing: 0.26em;
    line-height: 1.35;
    text-transform: uppercase;
}

.work-archive-notes strong {
    display: block;
    min-height: 3rem;
    font-family: var(--font-main);
    font-size: clamp(1.7rem, 2.4vw, 2.6rem);
    font-weight: 600;
    font-variation-settings: 'wght' 600;
    letter-spacing: -0.06em;
    line-height: 0.95;
}

.work-archive-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.work-archive-tags span,
.work-archive-open {
    border: 1px solid #111111;
    background: #ffffff;
    color: #050505;
    padding: 0.65rem 0.85rem;
    font-size: 0.72rem;
    font-weight: 800;
    font-variation-settings: 'wght' 760;
    letter-spacing: 0.18em;
    line-height: 1;
    text-transform: uppercase;
}

.work-archive-open {
    margin-top: 1.5rem;
    transition: background 0.2s ease, color 0.2s ease;
}

.work-archive-open:hover {
    background: #050505;
    color: #ffffff;
}

.work-archive-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.work-archive-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid #111111;
    background: #ffffff;
    color: #050505;
    padding: 0.65rem 0.85rem;
    font-size: 0.72rem;
    font-weight: 800;
    font-variation-settings: 'wght' 760;
    letter-spacing: 0.18em;
    line-height: 1;
    text-transform: uppercase;
    transition: background 0.2s ease, color 0.2s ease;
    text-decoration: none;
}

.work-archive-link-btn:hover {
    background: #050505;
    color: #ffffff;
}

.work-archive-enter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid #111111;
    padding: 0.8rem 1.2rem;
    font-size: 0.72rem;
    font-weight: 800;
    font-variation-settings: 'wght' 760;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    text-decoration: none;
    color: #050505;
    background: transparent;
    transition: background 0.2s ease, color 0.2s ease;
    margin-top: 1.5rem;
    width: 100%;
}

.work-archive-enter-btn svg {
    margin-left: 1rem;
}

.work-archive-enter-btn:hover {
    background: #050505;
    color: #ffffff;
}


.work-archive-more-toggle {
    appearance: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    align-self: stretch;
    width: 3.5rem;
    min-height: 100%;
    background: #ffffff;
    color: #050505;
    border: 0;
    border-left: 1px solid #111111;
    border-right: 1px solid #111111;
    font-family: var(--font-main);
    transition: background 0.2s ease, color 0.2s ease;
}

.work-archive-more-toggle:hover,
.work-archive-row.is-more-open .work-archive-more-toggle {
    background: #050505;
    color: #ffffff;
}

.work-archive-more-toggle > span:first-child {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    white-space: nowrap;
    transform: rotate(-90deg);
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.32em;
    line-height: 1;
    text-transform: uppercase;
}

.work-archive-more-icon {
    width: 2rem;
    aspect-ratio: 1;
    margin-top: 1.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid currentColor;
    font-size: 1rem;
    line-height: 1;
}

.work-archive-more-panel {
    min-width: 0;
    background: #eeeeec;
    border-left: 0 solid #111111;
    padding: 0;
    max-width: 0;
    opacity: 0;
    overflow: hidden;
    transition:
        max-width 0.55s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.32s ease,
        padding 0.45s cubic-bezier(0.22, 1, 0.36, 1),
        border-left-width 0.3s ease;
}

.work-archive-row.is-more-open .work-archive-more-panel {
    border-left-width: 1px;
    max-width: min(360px, 34vw);
    opacity: 1;
    padding: clamp(1rem, 2vw, 1.4rem);
}

@keyframes work-archive-more-slide {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.work-archive-more-eyebrow {
    margin-bottom: clamp(1.5rem, 4vh, 2.75rem);
}

.work-archive-more-block + .work-archive-more-block {
    margin-top: 1.75rem;
}

.work-archive-more-block strong {
    display: block;
    font-family: serif;
    font-size: clamp(1.85rem, 2.75vw, 3rem);
    font-weight: 400;
    letter-spacing: -0.06em;
    line-height: 0.95;
}

.work-archive-more-block > span {
    display: block;
    color: #555555;
    font-size: 1rem;
    line-height: 1.55;
}

.work-archive-focus-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.work-archive-focus-tags span {
    border: 1px solid #111111;
    background: #ffffff;
    padding: 0.6rem 0.75rem;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    line-height: 1;
    text-transform: uppercase;
}

.work-archive-more-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 1.75rem;
    border: 1px solid #111111;
    background: #ffffff;
    text-align: center;
}

.work-archive-more-stats div {
    min-width: 0;
    padding: 0.85rem 0.5rem;
}

.work-archive-more-stats div + div {
    border-left: 1px solid #111111;
}

.work-archive-more-stats strong {
    display: block;
    font-family: serif;
    font-size: clamp(2rem, 3.4vw, 3rem);
    font-weight: 400;
    letter-spacing: -0.08em;
    line-height: 0.9;
}

.work-archive-more-stats span {
    display: block;
    margin-top: 0.5rem;
    color: #666666;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

#question-speed-tip {
    z-index: 1605;
}

#question-speed-tip.visible {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    pointer-events: none;
}

#question-speed-tip .wf-hint-text {
    display: inline-block;
    opacity: 0.92;
    transform: translateY(0);
    clip-path: inset(0 0 0 0);
}

@keyframes handwrite-idle {
    0% { clip-path: inset(0 100% 0 0); opacity: 0; }
    20% { opacity: 0.5; }
    100% { clip-path: inset(0 0 0 0); opacity: 0.9; }
}

@keyframes handwrite-focus {
    0% { clip-path: inset(0 100% 0 0); opacity: 0; }
    20% { opacity: 0.5; }
    100% { clip-path: inset(0 0 0 0); opacity: 0.95; }
}

/* --- Rex Run Animation --- */
#rex-run-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 200px; /* Increased height to accommodate jump */
    pointer-events: none;
    z-index: 10;
    overflow: hidden;
}

#rex {
    position: absolute;
    bottom: 20px;
    left: 5vw; /* Start position */
    width: 44px;
    height: 47px;
    /* transform: scale(1); */
}

.rex-visual {
    width: 100%;
    height: 100%;
    position: relative;
}

/* Pixel Art Rex Construction */
.rex-head {
    position: absolute;
    top: 0;
    right: 0;
    width: 20px;
    height: 15px;
    background: currentColor;
}
.rex-head::before { /* Snout */
    content: '';
    position: absolute;
    top: 0;
    right: -10px;
    width: 10px;
    height: 10px;
    background: currentColor;
}
.rex-head::after { /* Jaw */
    content: '';
    position: absolute;
    bottom: -5px;
    right: -10px;
    width: 10px;
    height: 5px;
    background: currentColor;
}
.rex-eye {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 2px;
    height: 2px;
    background: #fff; /* Eye color */
}

.rex-blush {
    position: absolute;
    top: 7px;
    right: -4px;
    width: 2px;
    height: 2px;
    background: #fff;
    opacity: 0.42;
    box-shadow: -4px 0 0 rgba(255, 255, 255, 0.32);
}

.rex-spikes {
    position: absolute;
    top: 10px;
    left: 8px;
    width: 4px;
    height: 4px;
    background: currentColor;
    box-shadow:
        6px -3px 0 currentColor,
        12px -1px 0 currentColor;
    transform: rotate(45deg);
    transform-origin: center;
}

.rex-body {
    position: absolute;
    top: 15px;
    left: 5px;
    width: 25px;
    height: 18px;
    background: currentColor;
}
.rex-body::before { /* Tail */
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    width: 5px;
    height: 15px;
    background: currentColor;
}

.rex-arm {
    position: absolute;
    top: 18px;
    right: 10px;
    width: 4px;
    height: 4px;
    background: currentColor;
}
.rex-arm::after {
    content: '';
    position: absolute;
    top: 4px;
    right: -2px;
    width: 2px;
    height: 2px;
    background: currentColor;
}

.rex-sparkle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: currentColor;
    opacity: 0;
    pointer-events: none;
}

.rex-sparkle::before,
.rex-sparkle::after {
    content: "";
    position: absolute;
    background: currentColor;
}

.rex-sparkle::before {
    left: 1px;
    top: -3px;
    width: 1px;
    height: 9px;
}

.rex-sparkle::after {
    left: -3px;
    top: 1px;
    width: 9px;
    height: 1px;
}

.rex-sparkle-one {
    top: -12px;
    left: -8px;
}

.rex-sparkle-two {
    top: 6px;
    left: -18px;
    transform: scale(0.72);
}

.rex-leg {
    position: absolute;
    bottom: 0;
    width: 4px;
    height: 14px;
    background: currentColor;
    transform-origin: top center;
}

.front-leg {
    right: 12px;
}
.back-leg {
    left: 10px;
}

.rex-leg::after { /* Foot */
    content: '';
    position: absolute;
    bottom: 0;
    right: -2px;
    width: 6px;
    height: 2px;
    background: currentColor;
}

/* Running Animation */
@keyframes rex-run-1 {
    0%, 100% { height: 14px; transform: translateY(0); }
    50% { height: 8px; transform: translateY(0); }
}
@keyframes rex-run-2 {
    0%, 100% { height: 8px; transform: translateY(0); }
    50% { height: 14px; transform: translateY(0); }
}

#rex.running .front-leg {
    animation: rex-run-1 0.2s steps(2) infinite;
}
#rex.running .back-leg {
    animation: rex-run-2 0.2s steps(2) infinite;
}

#rex.running .rex-arm {
    animation: rex-arm-wave 0.24s steps(2) infinite;
}

#rex.running .rex-sparkle-one {
    animation: rex-sparkle-pop 0.72s steps(2) infinite;
}

#rex.running .rex-sparkle-two {
    animation: rex-sparkle-pop 0.72s steps(2) 0.18s infinite;
}

@keyframes rex-arm-wave {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(2px); }
}

@keyframes rex-sparkle-pop {
    0%, 100% { opacity: 0; transform: translateY(2px) scale(0.5); }
    35% { opacity: 0.62; transform: translateY(0) scale(1); }
    70% { opacity: 0; transform: translateY(-4px) scale(0.7); }
}

/* Jumping Animation */
@keyframes rex-jump {
    0% { transform: translateY(0); }
    50% { transform: translateY(-60px); }
    100% { transform: translateY(0); }
}

#rex.jumping .rex-visual {
    animation: rex-jump 0.6s ease-in-out;
}

#rex.jumping .rex-sparkle {
    animation-duration: 0.42s;
}

/* Rex Chat Bubble */
.rex-chat-bubble {
    --bubble-flip: 1;
    position: absolute;
    bottom: 100%;
    left: 68%;
    transform: translateX(-50%) scaleX(var(--bubble-flip));
    background: #fff;
    color: #313131;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
    margin-bottom: 15px;
    font-family: var(--font-flex);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.rex-chat-bubble::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -6px;
    border-width: 6px;
    border-style: solid;
    border-color: #fff transparent transparent transparent;
}

.rex-chat-bubble.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(-5px) scaleX(var(--bubble-flip));
}


/* ==========================================
   WATER DROP 3D JOURNEY
   ========================================== */

#water-drop-3d-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    transition: opacity 0.8s ease;
}

#water-drop-3d-container canvas {
    width: 100%;
    height: 100%;
}

/* Water drop journey overlay hints */
.water-drop-hint {
    position: fixed;
    bottom: 10%;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-flex);
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(100, 100, 100, 0.5);
    z-index: 2;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.water-drop-hint.visible {
    opacity: 1;
}

/* Floating droplet animations for final effect */
@keyframes floatUp {
    0% {
        transform: translateY(0) scale(1);
        opacity: 0.7;
    }
    50% {
        transform: translateY(-50vh) scale(0.8);
        opacity: 0.5;
    }
    100% {
        transform: translateY(-100vh) scale(0.5);
        opacity: 0;
    }
}

@keyframes rippleExpand {
    0% {
        transform: scale(0);
        opacity: 0.8;
    }
    100% {
        transform: scale(20);
        opacity: 0;
    }
}

/* Chapter-specific water drop backgrounds - transparent */
.story-chapter[data-chapter="1"],
.story-chapter[data-chapter="2"],
.story-chapter[data-chapter="3"],
.story-chapter[data-chapter="4"],
.story-chapter[data-chapter="5"] {
    --water-glow: transparent;
    background: transparent !important;
}

/* Water reflection effect on chapters - disabled for transparency */
.story-chapter::before {
    display: none;
}

.story-chapter.water-active::before {
    display: none;
}

/* Full screen floating effect overlay */
.floating-screen-effect {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 2;
    overflow: hidden;
}

.floating-screen-effect .droplet {
    position: absolute;
    width: 8px;
    height: 12px;
    background: radial-gradient(
        ellipse at 30% 30%,
        rgba(255, 255, 255, 0.95) 0%,
        rgba(240, 248, 255, 0.7) 40%,
        rgba(230, 240, 250, 0.4) 70%,
        transparent 100%
    );
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    box-shadow: 
        inset -1px -1px 2px rgba(255, 255, 255, 0.9),
        0 2px 4px rgba(0, 0, 0, 0.05);
    animation: floatUp 4s ease-out forwards;
}

/* Water drop ambient light sync - bright theme */
@keyframes waterAmbience {
    0%, 100% {
        filter: brightness(1) saturate(1);
    }
    50% {
        filter: brightness(1.02) saturate(1.02);
    }
}

#water-drop-3d-container.active {
    animation: waterAmbience 4s ease-in-out infinite;
}

/* Ensure site content stacks above the 3D background */
body, #smooth-wrapper, #smooth-content {
    position: relative;
    z-index: 10; /* Increased to ensure it's above the water drop container */
}

/* Remove noise overlay for cleaner look */
.story-chapter::after {
    display: none;
}

/* --- App Loading Screen --- */
#app-loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100vh;
    height: -webkit-fill-available;
    height: 100dvh;
    background-color: #ffffff;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    pointer-events: auto;
    transition: opacity 0.5s ease;
    overscroll-behavior: none;
    touch-action: none;
}

#app-loading-screen.hidden {
    pointer-events: none;
}

.loading-center {
    display: flex;
    align-items: center;
    gap: 1.5rem; /* Space between text and image */
    color: #313131;
    font-family: var(--font-main);
}

.loading-brand {
    font-size: 2rem;
    font-weight: 300;
    letter-spacing: -0.02em;
}

.loading-completion-mark {
    position: fixed;
    left: 50%;
    left: 50vw;
    top: 50%;
    top: 50dvh;
    width: 2.2em;
    height: 0.94em;
    color: #313131;
    font-family: var(--font-main);
    font-size: clamp(4.8rem, 14vw, 12.5rem);
    font-weight: 360;
    letter-spacing: 0;
    line-height: 0.88;
    opacity: 0;
    z-index: 10002;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(0.38);
    transform-origin: 50% 50%;
    will-change: transform, opacity;
}

.loading-completion-char {
    position: absolute;
    top: 0;
    display: inline-block;
    line-height: 0.88;
    transform-origin: 50% 66%;
    will-change: transform, opacity;
}

.loading-completion-w {
    left: 0.22em;
}

.loading-completion-slash {
    left: 0.96em;
}

.loading-completion-dot {
    left: 1.74em;
    opacity: 0;
    transform: scale(0);
    transform-origin: 50% 76%;
}

.loading-image-container {
    --loading-frame-height: 80px;
    --loading-frame-ar: 1.5;
    width: clamp(96px, calc(var(--loading-frame-height) * var(--loading-frame-ar)), 168px);
    height: var(--loading-frame-height);
    overflow: hidden;
    position: relative;
    background-color: #ffffff;
    border-radius: 2px;
    transition: width 0.72s cubic-bezier(0.22, 1, 0.36, 1);
}

#loading-image-track {
    width: 100%;
    height: 100%;
    position: relative;
}

.loading-slide-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    display: block;
}

.loading-bar-edge {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px; /* Thin edge */
    background-color: transparent;
    z-index: 10000;
}

.loading-dev-note {
    position: absolute;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    width: min(92vw, 760px);
    margin: 0;
    text-align: center;
    font-family: var(--font-main);
    font-size: clamp(0.72rem, 1.2vw, 0.9rem);
    font-weight: 500;
    letter-spacing: 0.02em;
    line-height: 1.45;
    color: rgba(49, 49, 49, 0.78);
    z-index: 10001;
    pointer-events: none;
}

.loading-bar-edge-fill {
    height: 100%;
    width: 0%;
    background-color: #111111;
    transition: width 0.2s linear;
}

@media (max-width: 768px) {
    .loading-completion-mark {
        font-size: clamp(4.2rem, 25vw, 8.6rem);
    }

    .loading-dev-note {
        bottom: 14px;
        width: min(94vw, 620px);
        font-size: clamp(0.66rem, 2.8vw, 0.82rem);
        line-height: 1.4;
    }
}

/* Special Font for Spark Icon */
.spark-icon {
    font-family: 'Noto Sans Phoenician', sans-serif;
    font-weight: 400;
}


/* --- Read More Button & Details --- */
.read-more-btn {
    display: none;
    margin-top: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-main);
    font-size: 1rem;
    font-weight: 500;
    color: var(--text);
    text-decoration: underline;
    text-underline-offset: 4px;
    padding: 0;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.read-more-btn:hover {
    opacity: 1;
}

.story-details {
    position: relative;
    z-index: 3;
    display: none;
    margin-top: 2rem;
    font-family: var(--font-main);
    font-size: 1.25rem;
    line-height: 1.5;
    color: var(--text);
    opacity: 0.9;
    white-space: pre-wrap;
    border-left: 1px solid var(--accent);
    padding-left: 2rem;
    overflow: hidden;
}

/* --- Image Viewer Modal --- */
.image-viewer-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 100000;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    color: #fff;
    font-family: var(--font-main);
}

.image-viewer-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.viewer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: -1;
}

.viewer-header {
    width: 100%;
    padding: 2rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 2;
}

.viewer-counter {
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    opacity: 0.6;
}

.viewer-close {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.viewer-close:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
}

.viewer-close-icon {
    width: 22px;
    height: 22px;
}

.viewer-content {
    flex: 1;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    z-index: 1;
}

.viewer-nav {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.viewer-nav svg {
    width: 24px;
    height: 24px;
}

.viewer-nav:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
}

.viewer-nav:disabled {
    opacity: 0.2;
    cursor: not-allowed;
    transform: none;
    pointer-events: none;
}

.magnetic-wrap:has(.viewer-nav:disabled) {
    pointer-events: none;
}

.viewer-image-container {
    flex: 1;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 2rem;
}

.viewer-image {
    max-width: 100%;
    max-height: 75vh;
    object-fit: contain;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    user-select: none;
    -webkit-user-drag: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.viewer-video {
    max-width: 100%;
    max-height: 75vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.viewer-youtube {
    width: min(100%, calc(75vh * 16 / 9));
    aspect-ratio: 16 / 9;
    max-height: 75vh;
    border: 0;
    border-radius: 4px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    background: #000;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

@media (max-width: 768px) {
    .viewer-content {
        padding: 0;
        position: relative;
    }
    
    .viewer-image-container {
        padding: 0;
        width: 100%;
        height: 100%;
        position: absolute;
        top: 0;
        left: 0;
        z-index: 1;
    }
    
    .viewer-image {
        max-width: 100vw;
        max-height: 80vh;
        border-radius: 0;
    }

    .viewer-video {
        max-width: 100vw;
        max-height: 80vh;
        border-radius: 0;
    }

    .viewer-youtube {
        width: 100vw;
        max-height: 80vh;
        border-radius: 0;
    }
    
    .viewer-nav {
        position: relative;
        z-index: 2;
        background: rgba(0, 0, 0, 0.3);
        border: none;
        width: 40px;
        height: 40px;
        margin: 0 10px;
    }
    
    .viewer-header {
        padding: 1rem 1.5rem;
    }
    
    .viewer-footer {
        padding: 1rem 1.5rem;
        min-height: 80px;
    }
    
    .viewer-caption {
        font-size: 0.9rem;
    }
}

.viewer-footer {
    width: 100%;
    padding: 2rem 3rem;
    text-align: center;
    z-index: 2;
    min-height: 100px;
}

.viewer-caption {
    font-size: 1rem;
    line-height: 1.5;
    opacity: 0.8;
    max-width: 800px;
    margin: 0 auto;
}

/* --- Mobile Cursor Fix --- */
@media (max-width: 768px) {
    #cursor, .cursor-progress {
        display: none !important;
    }
    
    *, body, #launching-page, #launching-page *, #launching-page canvas, #launching-page canvas.hoverable {
        cursor: auto !important;
    }
    
    a, button, .project-card, .gallery-image, .close-viewer, .viewer-nav, .nav-link, .theme-toggle, .lang-toggle, [role="button"] {
        cursor: pointer !important;
    }
}

/* --- Mobile Philosophy Section Fix --- */
@media (max-width: 768px) {
    .philosophy-section {
        min-height: 100vh;
        padding: 3vh 0 0 0;
        justify-content: flex-start;
    }
    
    #works-flow-wrapper {
        height: 75vh;
        margin-top: -5vh;
        flex-grow: 1;
    }
    
    .wf-hints {
        bottom: calc(4vh + env(safe-area-inset-bottom, 0px));
    }
    
    .wf-hint-shell {
        width: 85vw;
        padding: 0.5rem;
        background: rgba(255, 255, 255, 0.8);
        border-radius: 20px;
        backdrop-filter: blur(5px);
    }
    
    .wf-hint-text {
        font-size: 0.85rem;
    }

    .work-archive-hero {
        min-height: 80vh;
        padding: 1rem;
    }

    .work-archive-kicker,
    .work-archive-intro,
    .work-archive-filter-row,
    .work-archive-row-main {
        display: block;
    }

    .work-archive-kicker span {
        display: block;
        text-align: left !important;
    }

    .work-archive-kicker span + span {
        margin-top: 0.5rem;
    }

    .work-archive-title-wrap h2 {
        font-size: clamp(3.6rem, 16vw, 6.2rem);
        max-width: 8ch;
    }

    .work-archive-intro p:last-child {
        margin-top: 1rem;
    }

    .work-archive-marquee-track {
        font-size: clamp(3rem, 17vw, 5rem);
    }

    .work-archive-filter-row > p,
    .work-archive-filters {
        grid-column: auto;
    }

    .work-archive-filters {
        margin-top: 0.75rem;
    }

    .work-archive-grid-section {
        max-width: min(540px, calc(100% - 2rem));
        margin-left: auto;
        margin-right: auto;
    }

    .work-archive-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .work-archive-row-main {
        position: relative;
        padding: 1.1rem 1rem 1rem;
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto;
        grid-template-areas:
            "number title plus"
            ". meta year";
        column-gap: 0.75rem;
        row-gap: 0.8rem;
        align-items: start;
    }

    .work-archive-number {
        grid-area: number;
        margin: 0;
        padding-top: 0.36rem;
        font-size: 0.66rem;
        letter-spacing: 0.24em;
    }

    .work-archive-title {
        grid-area: title;
        font-size: clamp(2rem, 11.2vw, 3.55rem);
        font-weight: 750;
        font-variation-settings: 'wght' 750, 'wdth' 98;
        line-height: 0.9;
        letter-spacing: -0.058em;
        padding-right: 0;
        max-width: 11.8ch;
        text-wrap: balance;
    }

    .work-archive-meta,
    .work-archive-year {
        display: block;
        margin: 0;
        font-size: 0.65rem;
        letter-spacing: 0.2em;
        opacity: 0.86;
    }

    .work-archive-meta {
        grid-area: meta;
        justify-self: start;
    }

    .work-archive-year {
        grid-area: year;
        justify-self: end;
    }

    .work-archive-plus {
        grid-area: plus;
        position: static;
        justify-content: flex-end;
    }

    .work-archive-plus span {
        width: 2.6rem;
        font-size: 1.25rem;
    }

    .work-archive-panel {
        display: block;
        padding: 0 1rem;
        max-height: 0;
        opacity: 0;
        pointer-events: none;
    }

    .work-archive-row.is-open .work-archive-panel {
        padding: 0 1rem 1.5rem;
        max-height: 3000px;
        opacity: 1;
        pointer-events: auto;
    }

    .work-archive-primary {
        display: block;
        padding: 1rem 0 0;
        transform: none !important;
    }

    .work-archive-more-btn {
        writing-mode: horizontal-tb;
        width: 100%;
        border-left: none;
        border-top: 1px solid #111111;
        margin-top: 2rem;
        padding: 1rem 0;
    }

    .work-archive-media {
        margin-bottom: 1rem;
    }

    .work-archive-grid-meta {
        margin-top: 0.45rem;
        gap: 0.5rem;
    }

    .work-archive-grid-item h3 {
        font-size: clamp(0.85rem, 3.2vw, 1rem);
    }

    .work-archive-grid-arrow {
        width: 2.25rem;
        height: 2.25rem;
    }

    .work-archive-grid-arrow span {
        font-size: 1.35rem;
    }

    .archive-float-window {
        left: -9999px;
        top: -9999px;
        right: auto;
        bottom: auto;
        width: min(320px, calc(100vw - 2rem));
    }

    .archive-float-line {
        display: none;
    }

    .work-archive-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .work-archive-desc {
        max-width: 100%;
        font-size: clamp(2.2rem, 12vw, 4rem);
    }

    .work-archive-links {
        display: none;
    }

    .work-archive-notes {
        grid-template-columns: 1fr;
    }

    .work-archive-more-toggle {
        width: 100%;
        min-height: 4rem;
        margin-top: 1rem;
        border: 1px solid #111111;
        flex-direction: row;
    }

    .work-archive-more-toggle > span:first-child {
        transform: none;
    }

    .work-archive-more-icon {
        margin-top: 0;
        margin-left: 0.75rem;
    }

    .work-archive-more-panel {
        margin-top: 0;
        border: 1px solid #111111;
        border-top: 0;
        max-width: 100%;
        opacity: 1;
        padding: 1rem;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s cubic-bezier(0.22, 1, 0.36, 1), padding 0.3s ease;
    }

    .work-archive-row.is-more-open .work-archive-more-panel {
        max-height: 1200px;
        padding: 1rem;
    }

    .work-archive-more-eyebrow {
        margin-bottom: 2rem;
    }
    
}/* Launching Portfolio Button */
.launch-portfolio-btn {
    appearance: none;
    -webkit-appearance: none;
    background: #ffffff;
    border: 1px solid #313131;
    color: #313131;
    padding: 1rem 2rem;
    font-family: var(--font-flex), sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    cursor: none !important; /* Hide native cursor for custom cursor */
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-radius: 9999px; /* Pill shape */
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    overflow: hidden;
    z-index: 10;
    pointer-events: auto; /* Allow clicking */
}

.launch-portfolio-btn:disabled {
    pointer-events: none;
    opacity: 0.88;
}

#launching-continue-wrap {
    opacity: 0;
    transform: translateX(-50%) translateY(22px) scale(0.97);
    pointer-events: none;
    transition: opacity 0.45s ease, transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

#launching-continue-wrap.is-ready {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
    pointer-events: auto;
}

#launching-continue-wrap.is-ready .launch-portfolio-btn {
    animation: launchContinueReveal 0.72s cubic-bezier(0.19, 1, 0.22, 1);
}

#launching-page.questionnaire-mode #launching-continue-wrap {
    opacity: 0 !important;
    transform: translateX(-50%) translateY(22px) scale(0.97) !important;
    pointer-events: none !important;
}

@keyframes launchContinueReveal {
    0% {
        opacity: 0;
        transform: translateY(10px) scale(0.95);
    }
    60% {
        opacity: 1;
        transform: translateY(-2px) scale(1.02);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.launch-portfolio-btn:hover {
    background: #313131;
    color: #ffffff;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.launch-portfolio-btn:disabled:hover {
    background: #ffffff;
    color: #313131;
    box-shadow: none;
    transform: none;
}

.launch-portfolio-btn span {
    position: relative;
    z-index: 2;
}

.launch-portfolio-btn svg {
    width: 1.25rem;
    height: 1.25rem;
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    z-index: 2;
}

.launch-portfolio-btn:hover svg {
    transform: translate(3px, -3px);
}

/* Mobile CTA button positioning and text wrapping adjustments */
@media (max-width: 768px) {
    #launching-continue-wrap {
        bottom: 6% !important; /* Move slightly lower on mobile (was 10%) */
        width: max-content; /* Ensure wrap allows single line */
        max-width: 90vw;
    }
    
    .launch-portfolio-btn {
        white-space: nowrap;
    }
    
    .launch-portfolio-btn span {
        white-space: nowrap;
    }
}

/* =========================================
   Footer Section
   ========================================= */
.footer-section {
    background-color: #111111;
    color: #e6e6e6;
    padding: clamp(5rem, 9vw, 8.4rem) 5vw clamp(2.5rem, 4.5vw, 4rem);
    min-height: auto;
    margin-top: 0;
    font-family: var(--font-main);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    z-index: 10;
}

.footer-container {
    max-width: 1440px;
    margin: 0 auto;
    width: 100%;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: clamp(2.6rem, 5.5vw, 4.6rem);
    margin-bottom: clamp(3.4rem, 7.2vw, 6rem);
}

.footer-brand {
    max-width: 600px;
}

.footer-headline {
    font-family: var(--font-flex);
    font-size: clamp(2.4rem, 5.6vw, 4.4rem);
    font-weight: 500;
    line-height: 1.1;
    margin-bottom: 1.8rem;
    color: #ffffff;
    letter-spacing: -0.02em;
}

.footer-email-row {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    position: relative;
}

.footer-email {
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    border: 0;
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    font-family: inherit;
    color: #e6e6e6;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(230, 230, 230, 0.3);
    transition: all 0.3s ease;
}

.footer-email:hover,
.footer-email:focus-visible {
    color: #ffffff;
    border-bottom-color: #ffffff;
}

.footer-email:focus-visible,
.footer-email-action:focus-visible {
    outline: 1px solid rgba(255, 255, 255, 0.85);
    outline-offset: 4px;
}

.footer-email-action {
    width: 2.35rem;
    height: 2.35rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #e6e6e6;
    border: 1px solid rgba(230, 230, 230, 0.28);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.02);
    transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.footer-email-action:hover {
    color: #313131;
    border-color: #ffffff;
    background: #ffffff;
    transform: translateY(-1px);
}

.footer-email-icon {
    width: 1.05rem;
    height: 1.05rem;
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.footer-email-icon-mail {
    position: absolute;
    opacity: 0;
    transform: scale(0.72) rotate(-8deg);
}

.footer-email-row.is-copied .footer-email-icon-copy {
    opacity: 0;
    transform: scale(0.72) rotate(8deg);
}

.footer-email-row.is-copied .footer-email-icon-mail {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

.footer-email-status {
    position: absolute;
    left: 0;
    top: calc(100% + 0.38rem);
    font-size: 0.78rem;
    line-height: 1;
    color: rgba(230, 230, 230, 0.62);
    opacity: 0;
    transform: translateY(-0.18rem);
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.footer-email-row.is-copied .footer-email-status,
.footer-email-row.is-error .footer-email-status {
    opacity: 1;
    transform: translateY(0);
}

.footer-links-grid {
    display: flex;
    gap: clamp(2.4rem, 5.5vw, 4.8rem);
}

.footer-col h4 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(230, 230, 230, 0.5);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col ul li {
    margin-bottom: 1rem;
}

.footer-link {
    color: #e6e6e6;
    text-decoration: none;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    display: inline-block;
    position: relative;
}

.footer-link::after {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 1px;
    bottom: -2px;
    left: 0;
    background-color: #ffffff;
    transform-origin: bottom right;
    transition: transform 0.3s cubic-bezier(0.86, 0, 0.07, 1);
}

.footer-link:hover {
    color: #ffffff;
}

.footer-link:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

.soul-archetype-tease,
.soul-archetype-tease:hover,
.soul-archetype-tease:focus-visible {
    color: #5c5b5b;
}

.soul-archetype-tease::after {
    background-color: #5c5b5b;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.1rem 2rem;
    padding-top: 2.3rem;
    border-top: 1px solid rgba(230, 230, 230, 0.1);
    font-size: 0.9rem;
    color: rgba(230, 230, 230, 0.6);
}

.footer-time {
    white-space: nowrap;
}

#footer-time-display {
    display: inline-block;
    min-width: 5.8em;
    text-align: right;
    color: rgba(230, 230, 230, 0.9);
    margin-left: 0.35rem;
    font-variant-numeric: tabular-nums;
}

@media (max-width: 768px) {
    .footer-section {
        padding: 4.5rem 1.5rem 2.25rem;
    }

    .footer-container {
        max-width: 34rem;
    }

    .footer-top {
        flex-direction: column;
        gap: 2.6rem;
        margin-bottom: 2.4rem;
    }

    .footer-brand {
        max-width: 100%;
    }

    .footer-headline {
        font-size: clamp(2rem, 10vw, 2.8rem);
        line-height: 1.04;
        margin-bottom: 1.15rem;
    }

    .footer-email {
        font-size: 1.02rem;
    }

    .footer-email-row {
        max-width: 100%;
        gap: 0.55rem;
    }

    .footer-email-text {
        overflow-wrap: anywhere;
    }

    .footer-email-action {
        flex: 0 0 auto;
        width: 2.2rem;
        height: 2.2rem;
    }

    .footer-links-grid {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1.8rem 1rem;
        padding-top: 1.2rem;
        border-top: 1px solid rgba(230, 230, 230, 0.12);
    }

    .footer-col h4 {
        margin-bottom: 1rem;
        font-size: 0.78rem;
        letter-spacing: 0.12em;
    }

    .footer-link {
        font-size: 1rem;
    }

    .footer-col ul li {
        margin-bottom: 0.75rem;
    }

    .footer-bottom {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.7rem;
        align-items: flex-start;
        padding-top: 1.35rem;
        font-size: 0.82rem;
    }

    .footer-time {
        white-space: normal;
    }

    #footer-time-display {
        margin-left: 0.2rem;
        text-align: left;
        min-width: auto;
    }

    .footer-scroll-top {
        margin-top: 0.45rem;
    }

    .footer-scroll-top .footer-link {
        font-size: 0.95rem;
    }
}

.soul-tease-bubble {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 10020;
    pointer-events: none;
    max-width: min(30rem, 78vw);
    padding: 0.55rem 0.9rem;
    background: rgba(252, 252, 252, 0.96);
    color: #313131;
    border: 1px solid rgba(17, 17, 17, 0.2);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.24);
    font-family: var(--font-main);
    font-size: clamp(0.82rem, 1.6vw, 0.98rem);
    letter-spacing: 0.015em;
    line-height: 1.2;
    white-space: nowrap;
    transform-origin: center;
    will-change: transform, opacity;
}

.soul-tease-bubble::after {
    content: '';
    position: absolute;
    bottom: -0.35rem;
    width: 0.62rem;
    height: 0.62rem;
    background: rgba(252, 252, 252, 0.96);
    border-right: 1px solid rgba(17, 17, 17, 0.2);
    border-bottom: 1px solid rgba(17, 17, 17, 0.2);
    transform: rotate(45deg);
}

.soul-tease-bubble.shape-capsule {
    border-radius: 999px;
}

.soul-tease-bubble.shape-cloud {
    border-radius: 1.4rem 1rem 1.35rem 1.2rem / 1.1rem 1.35rem 1.15rem 1.4rem;
}

.soul-tease-bubble.shape-tag {
    border-radius: 0.8rem 1.25rem 0.9rem 1.5rem;
}

.soul-tease-bubble.shape-organic {
    border-radius: 1.7rem 1.1rem 1.45rem 1.85rem / 1.2rem 1.55rem 1.1rem 1.4rem;
}

.soul-tease-bubble.tail-left::after {
    left: 1.05rem;
}

.soul-tease-bubble.tail-mid::after {
    left: calc(50% - 0.31rem);
}

.soul-tease-bubble.tail-right::after {
    left: auto;
    right: 1.05rem;
}

@media (max-width: 768px) {
    .soul-tease-bubble {
        max-width: 84vw;
        padding: 0.52rem 0.75rem;
        font-size: 0.84rem;
        white-space: normal;
    }
}

.site-notice {
    position: fixed;
    right: clamp(1rem, 3vw, 2rem);
    bottom: clamp(1rem, 3vw, 2rem);
    z-index: 10040;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
    width: min(46rem, calc(100vw - 2rem));
    padding: 0.9rem;
    color: #313131;
    background: #ffffff;
    border: 1px solid rgba(49, 49, 49, 0.13);
    border-radius: 1rem;
    box-shadow: 0 18px 50px rgba(17, 17, 17, 0.14);
    opacity: 0;
    transform: translateY(1rem);
    pointer-events: none;
    transition: opacity 0.28s ease, transform 0.28s ease;
}

.site-notice[hidden] {
    display: none;
}

.site-notice.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

body.modal-open .site-notice {
    opacity: 0;
    transform: translateY(1rem);
    pointer-events: none;
}

.site-notice__mark {
    display: grid;
    place-items: center;
    width: 3.2rem;
    height: 3.2rem;
    border-radius: 50%;
    background: #313131;
    color: #ffffff;
    font-family: var(--font-flex);
    font-size: 1.05rem;
    font-variation-settings: 'wght' 800;
    letter-spacing: 0;
}

.site-notice__copy {
    min-width: 0;
}

.site-notice__eyebrow {
    margin-bottom: 0.18rem;
    font-size: 0.78rem;
    font-variation-settings: 'wght' 780;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(49, 49, 49, 0.68);
}

.site-notice__text {
    max-width: 31rem;
    font-size: 0.96rem;
    line-height: 1.35;
    color: rgba(49, 49, 49, 0.86);
}

.site-notice__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.45rem;
}

.site-notice__button {
    appearance: none;
    border: 1px solid rgba(49, 49, 49, 0.16);
    border-radius: 999px;
    padding: 0.58rem 0.86rem;
    background: rgba(255, 255, 255, 0.55);
    color: #313131;
    font-family: var(--font-main);
    font-size: 0.9rem;
    font-variation-settings: 'wght' 680;
    line-height: 1;
    white-space: nowrap;
    transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.site-notice__button:hover,
.site-notice__button:focus-visible {
    transform: translateY(-1px);
}

.site-notice__button--primary {
    min-width: 9.25rem;
    background: #313131;
    border-color: #313131;
    color: #ffffff;
}

.site-notice__button--ghost:hover,
.site-notice__button--ghost:focus-visible {
    background: rgba(49, 49, 49, 0.08);
}

.site-notice__button--primary:hover,
.site-notice__button--primary:focus-visible {
    background: #111111;
    border-color: #111111;
}

@media (max-width: 768px) {
    .site-notice {
        left: 1rem;
        right: 1rem;
        bottom: max(1rem, env(safe-area-inset-bottom));
        grid-template-columns: auto minmax(0, 1fr);
        gap: 0.75rem;
        padding: 0.78rem;
        border-radius: 0.9rem;
    }

    .site-notice__mark {
        width: 2.7rem;
        height: 2.7rem;
        font-size: 0.9rem;
    }

    .site-notice__text {
        font-size: 0.88rem;
    }

    .site-notice__actions {
        grid-column: 1 / -1;
        justify-content: stretch;
    }

    .site-notice__button {
        flex: 1 1 7.5rem;
        padding: 0.68rem 0.75rem;
    }

    .site-notice__button--primary {
        flex-grow: 1.55;
        min-width: 10rem;
    }
}

.site-notice.is-near-footer {
    opacity: 0;
    transform: translateY(1rem);
    pointer-events: none;
}

.work-archive-grid-loader,
.work-archive-row-loader,
.archive-float-media-loader,
.archive-float-gallery-loader {
    width: 100%;
}

.work-archive-grid-loader,
.archive-float-media-loader {
    height: 100%;
}

.work-archive-row-loader img,
.work-archive-row-loader video,
.work-archive-grid-loader img,
.work-archive-grid-loader video,
.archive-float-media-loader img,
.archive-float-media-loader video,
.archive-float-gallery-loader img,
.archive-float-gallery-loader video,
.archive-float-gallery-loader iframe {
    width: 100%;
    height: 100%;
    display: block;
}

.archive-float-gallery-loader {
    min-height: 140px;
}

.modal-gallery-loader {
    background: #ececea;
}
.work-archive-row-loader {
    aspect-ratio: 4 / 5;
    display: block;
}

.archive-float-gallery-loader.is-youtube-loader {
    aspect-ratio: 16 / 9;
    max-height: none;
}

.archive-float-gallery-loader img,
.archive-float-gallery-loader video {
    object-fit: contain;
    background: #ffffff;
}