:root {
    --black: #0d0d0d;
    --red: #e8001c;
    --white: #f0f0f0;
    --glass-bg: rgba(255,255,255,0.04);
    --glass-border: rgba(255,255,255,0.08);
    --glass-border-bright: rgba(255,255,255,0.14);
    --dim: #666;
    /* Dynamic gradient blobs — tinted per active section by app.js */
    --blob-a: #e8001c;
    --blob-b: #2baadc;
    --blob-c: #f26522;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.15) #0a0a0a;
}

body {
    font-family: 'Montserrat', sans-serif;
    font-weight: 300;
    background: var(--black);
    color: var(--white);
    overflow-x: hidden;
    cursor: none;
}

body.no-gsap {
    cursor: auto;
}

body.no-gsap a,
body.no-gsap button,
body.no-gsap .menu-item,
body.no-gsap .glass-card,
body.no-gsap .nav-dot {
    cursor: pointer;
}

/* Native cursor stays hidden everywhere while the custom cursor runs.
   (no-gsap fallback above keeps native cursors when it can't run.) */
body:not(.no-gsap) *,
body:not(.no-gsap) *::before,
body:not(.no-gsap) *::after {
    cursor: none !important;
}

/* ---- Base polish (selection, scrollbar, focus) ---- */
::selection {
    background: var(--red);
    color: var(--white);
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #0a0a0a;
}

::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.12);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(232,0,28,0.55);
}

:focus-visible {
    outline: 2px solid var(--red);
    outline-offset: 3px;
}

/* ---- Dynamic gradient backdrop (subtle) ---- */
#bgGradient {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

#bgGradient .blob {
    position: absolute;
    border-radius: 50%;
    will-change: transform;
}

.blob-1 {
    width: 62vw;
    height: 62vw;
    left: -18vw;
    top: -22vh;
    background: radial-gradient(circle, rgba(232,0,28,0.09) 0%, transparent 62%);
    background: radial-gradient(circle, color-mix(in srgb, var(--blob-a, #e8001c) 9%, transparent) 0%, transparent 62%);
}

.blob-2 {
    width: 52vw;
    height: 52vw;
    right: -14vw;
    top: 28vh;
    background: radial-gradient(circle, rgba(43,170,220,0.07) 0%, transparent 62%);
    background: radial-gradient(circle, color-mix(in srgb, var(--blob-b, #2baadc) 7%, transparent) 0%, transparent 62%);
}

.blob-3 {
    width: 56vw;
    height: 56vw;
    left: 28vw;
    bottom: -28vh;
    background: radial-gradient(circle, rgba(242,101,34,0.06) 0%, transparent 62%);
    background: radial-gradient(circle, color-mix(in srgb, var(--blob-c, #f26522) 6%, transparent) 0%, transparent 62%);
}

#dotCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--black);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.symbol-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
}

#loaderSymbol .sym-circle,
#loaderSymbol .sym-line {
    stroke-dasharray: 500;
    stroke-dashoffset: 500;
}

.sweep-line {
    position: absolute;
    top: 50%;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--red);
    transform: translateY(-50%);
}

#loader.hidden {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease;
}

#menu {
    position: fixed;
    top: 0;
    left: 40px;
    width: 180px;
    height: 100vh;
    z-index: 100;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding-bottom: 180px;
    align-items: flex-start;
    pointer-events: all;
    background: rgba(13,13,13,0.32);
    backdrop-filter: blur(11px);
    -webkit-backdrop-filter: blur(11px);
    border-left: 1px solid rgba(255,255,255,0.06);
    border-right: 1px solid rgba(255,255,255,0.06);
    margin: 0;
    padding-left: 0;
}

.menu-content {
    display: flex;
    flex-direction: column;
    padding: 0 24px;
    width: 100%;
    box-sizing: border-box;
    opacity: 0;
    transform: translateY(20px);
}

.menu-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 10px;
    letter-spacing: 0.2em;
    color: rgba(255,255,255,0.4);
    margin-bottom: 20px;
    text-transform: uppercase;
}

.menu-divider {
    width: 0;
    height: 1px;
    background: #e8001c;
    margin-bottom: 28px;
}

.menu-items {
    list-style: none;
    padding: 0;
    margin: 0 0 28px 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.menu-item {
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.25);
    cursor: none;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    padding-left: 12px;
    transition: color 0.2s;
    opacity: 0;
    transform: translateX(-10px);
}

.menu-item span {
    font-size: 9px;
    color: rgba(255,255,255,0.15);
}

.menu-item.active {
    color: #f0f0f0;
}

.menu-item.active span {
    color: var(--red);
}

.menu-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 2px;
    height: 14px;
    background: #e8001c;
}

.scroll-progress {
    width: 100%;
    height: 1px;
    background: rgba(255,255,255,0.08);
    margin-top: 0;
    position: relative;
}

.progress-bar {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0%;
    background: #e8001c;
    transition: width 0.1s linear;
}

.scroll-percent {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 10px;
    color: rgba(255,255,255,0.4);
    text-align: right;
    margin-top: 8px;
    letter-spacing: 0.1em;
}

.build-tag {
    font-family: 'Montserrat', sans-serif;
    font-weight: 300;
    font-size: 9px;
    color: rgba(255,255,255,0.22);
    text-align: right;
    margin-top: 4px;
    letter-spacing: 0.15em;
}

#logo {
    position: fixed;
    top: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    z-index: 100;
    cursor: pointer;
    color: var(--white);
    opacity: 0;
    transition: transform 0.3s ease;
}

#logo:hover {
    transform: rotate(90deg);
}

#hamburger {
    position: fixed;
    top: 34px;
    left: 24px;
    width: 44px;
    height: 44px;
    z-index: 300;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
}

#hamburger span {
    display: block;
    width: 26px;
    height: 2px;
    background: var(--white);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#hamburger.open span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

#hamburger.open span:nth-child(2) {
    opacity: 0;
}

#hamburger.open span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

#main {
    margin-left: 220px;
    width: calc(100vw - 220px);
    position: relative;
    z-index: 1;
    overflow-x: hidden;
}

.section {
    min-height: 100vh;
    padding: 100px 60px;
    display: flex;
    align-items: center;
}

.section-title {
    font-family: 'Livvic', sans-serif;
    font-weight: 900;
    font-size: clamp(40px, 6vw, 80px);
    letter-spacing: -0.01em;
    color: var(--white);
    margin-bottom: 30px;
}

/* Numerals stay optically stable while counting / updating */
.stat-num,
.scroll-percent,
.project-num,
.slide-num,
.detail-num,
.menu-item span,
.step-num,
.hotspot-num {
    font-variant-numeric: tabular-nums;
}

#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-content {
    max-width: 900px;
}

.hero-subtitle {
    font-family: 'Montserrat', sans-serif;
    font-weight: 300;
    font-size: 14px;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--dim);
    margin-bottom: 20px;
}

.hero-name {
    font-family: 'Livvic', sans-serif;
    font-weight: 900;
    font-size: clamp(80px, 14vw, 180px);
    line-height: 0.9;
    letter-spacing: -0.02em;
    margin-bottom: 30px;
}

.name-line {
    display: block;
    opacity: 0;
    transform: translateY(60px);
}

.name-line .dot {
    color: var(--red);
}

.hero-desc {
    font-family: 'Montserrat', sans-serif;
    font-weight: 300;
    font-size: 16px;
    line-height: 1.7;
    color: var(--dim);
    max-width: 500px;
    margin-bottom: 40px;
    opacity: 0;
    transform: translateY(30px);
}

.hero-buttons {
    display: flex;
    gap: 20px;
    margin-bottom: 50px;
    opacity: 0;
    transform: translateY(30px);
}

.btn {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none;
    padding: 16px 32px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--red);
    color: var(--white);
    border: 1px solid var(--red);
}

.btn-primary:hover {
    background: transparent;
    color: var(--red);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 1px solid var(--white);
}

.btn-secondary:hover {
    background: var(--white);
    color: var(--black);
}

/* Arrow nudge on hover */
.btn span {
    display: inline-block;
    transition: transform 0.3s ease;
}

.btn:hover span {
    transform: translateX(5px);
}

/* Primary button: light sweep across on hover */
.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -80%;
    width: 55%;
    height: 100%;
    background: linear-gradient(115deg, transparent, rgba(255,255,255,0.28), transparent);
    transform: skewX(-22deg);
    transition: left 0.55s ease;
    pointer-events: none;
}

.btn-primary:hover::before {
    left: 125%;
}

.hero-quote {
    font-family: 'Montserrat', sans-serif;
    font-weight: 300;
    font-size: 14px;
    font-style: italic;
    color: var(--dim);
    max-width: 500px;
    opacity: 0;
    transform: translateY(30px);
}

#about {
    background: transparent;
}

.about-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 60px;
    width: 100%;
    max-width: 900px;
}

.about-left .section-title {
    clip-path: polygon(0 0, 0 0, 0 100%, 0% 100%);
}

.about-quote {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 20px;
    font-style: italic;
    margin-bottom: 30px;
    padding-left: 20px;
    border-left: 2px solid var(--red);
    background: linear-gradient(180deg, #f0f0f0 -28%, transparent 114%);
    background-size: 100% 400%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    background-position: 0% 100%;
}

.about-bio {
    font-family: 'Montserrat', sans-serif;
    font-weight: 300;
    font-size: 15px;
    line-height: 1.8;
    color: var(--dim);
    margin-bottom: 20px;
}

.about-stats {
    display: flex;
    gap: 40px;
    margin-top: 40px;
}

.stat {
    text-align: center;
}

.stat-num {
    font-family: 'Livvic', sans-serif;
    font-weight: 900;
    font-size: 48px;
    color: var(--red);
    display: block;
}

.stat-label {
    font-family: 'Montserrat', sans-serif;
    font-weight: 300;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--dim);
}

.experience-section {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.experience-item {
    padding: 15px 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.experience-item h4 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 15px;
    color: var(--white);
    margin-bottom: 5px;
}

.experience-item p {
    font-family: 'Montserrat', sans-serif;
    font-weight: 300;
    font-size: 12px;
    color: var(--dim);
    margin-bottom: 5px;
}

.experience-item span {
    font-family: 'Montserrat', sans-serif;
    font-weight: 300;
    font-size: 11px;
    color: rgba(255,255,255,0.4);
}

.about-right {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 25px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.glass-card:hover {
    background: rgba(255,255,255,0.08);
    border-color: var(--glass-border-bright);
}

.card-num {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 12px;
    color: var(--red);
    display: block;
    margin-bottom: 15px;
}

.glass-card h3 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 16px;
    color: var(--white);
    margin-bottom: 10px;
}

.glass-card p {
    font-family: 'Montserrat', sans-serif;
    font-weight: 300;
    font-size: 13px;
    color: var(--dim);
    line-height: 1.5;
}

.glass-card .arrow {
    display: none;
    color: var(--red);
    font-size: 18px;
    margin-top: 15px;
}

.glass-card.active .arrow {
    display: block;
}

.glass-card.soon {
    opacity: 0.4;
}

.soon-badge {
    display: inline-block;
    background: var(--red);
    color: var(--white);
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 4px 10px;
    margin-top: 15px;
}

#work {
    padding: 80px 0 0 0;
    overflow: hidden;
}

.work-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.work-list {
    padding: 0 60px;
    margin-bottom: 40px;
}

.work-list .section-title {
    margin-bottom: 30px;
}

.project-list {
    list-style: none;
    display: flex;
    gap: 40px;
}

.project-item {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 14px;
    color: var(--dim);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.project-item.active {
    color: var(--white);
}

.project-item:hover {
    color: var(--white);
}

.project-num {
    font-weight: 300;
    font-size: 12px;
    opacity: 0.5;
    transition: color 0.3s ease;
}

.project-item:hover .project-num,
.project-item.active .project-num {
    color: var(--red);
    opacity: 1;
}

.project-cat {
    font-size: 11px;
    color: var(--proj-accent, var(--red));
    font-weight: 300;
}

/* Per-project accent identity (matches the portfolio PDFs) */
.slide[data-project="1"], .project-item[data-project="1"] { --proj-accent: #e8001c; }
.slide[data-project="2"], .project-item[data-project="2"] { --proj-accent: #2BAADC; }
.slide[data-project="3"], .project-item[data-project="3"] { --proj-accent: #F26522; }
.slide[data-project="4"], .project-item[data-project="4"] { --proj-accent: #D4A843; }
.slide[data-project="5"], .project-item[data-project="5"] { --proj-accent: #E8373A; }
.slide[data-project="6"], .project-item[data-project="6"] { --proj-accent: #F26522; }
.slide[data-project="7"], .project-item[data-project="7"] { --proj-accent: #7AB648; }

.work-slider {
    flex: 1;
    overflow: hidden;
}

.slider-track {
    display: flex;
    height: 100%;
}

.slide {
    min-width: 60vw;
    height: 100%;
    padding: 0 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.slide-image {
    width: 100%;
    height: 60vh;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--glass-border);
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.main-slide-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
    transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.slide:hover .main-slide-img {
    transform: scale(1.04);
}

.floating-img {
    position: absolute;
    z-index: 10;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-radius: 8px;
    background: #fff; /* Some images might have white background in prototype */
}

.floating-left {
    width: 35%;
    max-width: 300px;
    left: -5%;
    top: 20%;
    transform: rotate(-12deg);
}

.floating-right {
    width: 40%;
    max-width: 350px;
    right: -8%;
    top: 10%;
    transform: rotate(15deg);
}

.slide:hover .floating-left {
    transform: rotate(-8deg) scale(1.05) translateY(-10px);
}

.slide:hover .floating-right {
    transform: rotate(10deg) scale(1.05) translateY(-10px);
}

.slide-info {
    display: flex;
    align-items: baseline;
    gap: 20px;
}

.slide-num {
    font-family: 'Livvic', sans-serif;
    font-weight: 900;
    font-size: 24px;
    color: var(--proj-accent, var(--red));
}

.slide-info h3 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 28px;
    color: var(--white);
}

.slide-info p {
    font-family: 'Montserrat', sans-serif;
    font-weight: 300;
    font-size: 14px;
    color: var(--dim);
}

.work-nav {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 30px 0;
}

.nav-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--glass-border);
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-dot:hover {
    background: rgba(232,0,28,0.55);
    transform: scale(1.15);
}

.nav-dot.active {
    background: var(--red);
    transform: scale(1.2);
}

.project-detail {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--black);
    z-index: 200;
    padding: 36px clamp(20px, 5vw, 80px) 120px;
    overflow-y: auto;
    transform: translateY(100%);
    opacity: 0;
}

.project-detail.active {
    transform: translateY(0);
    opacity: 1;
}

.go-back {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    color: var(--dim);
    background: none;
    border: none;
    cursor: pointer;
    display: block;
    width: 100%;
    max-width: 1240px;
    margin: 0 auto 44px;
    text-align: left;
    transition: color 0.3s ease, letter-spacing 0.3s ease;
}

.go-back:hover {
    color: var(--red);
    letter-spacing: 0.06em;
}

/* Project index: small coral label, no decoration */
.detail-num {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--proj-accent, var(--red));
    display: block;
    margin-bottom: 24px;
}

/* Case-study title: one clean sans family, bold weight */
.detail-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: clamp(36px, 5vw, 64px);
    line-height: 1.06;
    letter-spacing: -0.01em;
    color: var(--white);
    max-width: 18ch;
    margin-bottom: 48px;
}

/* Hero: the render floats on the page background — no frame, no mat */
.detail-image {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    margin-bottom: 56px;
}

/* Lede: plain light text, no rules */
.detail-desc {
    font-family: 'Montserrat', sans-serif;
    font-weight: 300;
    font-size: 17px;
    color: var(--dim);
    line-height: 1.8;
    max-width: 58ch;
    margin-bottom: 48px;
}

/* Tags read as a print-style slash-separated row */
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    margin-bottom: 64px;
}

.detail-tags span {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--white);
    padding: 6px 0;
    background: none;
    border: none;
}

.detail-tags span + span::before {
    content: '/';
    color: var(--proj-accent, var(--red));
    margin: 0 16px;
    font-weight: 300;
}

.detail-story {
    margin-bottom: 60px;
}

.detail-story p {
    font-family: 'Montserrat', sans-serif;
    font-weight: 300;
    font-size: 16px;
    color: var(--dim);
    line-height: 1.8;
    max-width: 800px;
    margin-bottom: 24px;
}

.detail-story p:last-child {
    margin-bottom: 0;
}

.detail-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.gallery-item {
    width: 100%;
    height: 200px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--glass-border);
    position: relative;
    overflow: hidden;
}

.detail-meta {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    padding-bottom: 48px;
    margin-bottom: 48px;
}

.meta-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.meta-label {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--dim);
}

.meta-value {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 14px;
    color: var(--white);
    line-height: 1.6;
}

.section-caption {
    display: block;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--dim);
    margin-bottom: 16px;
}

/* ---- Process chapter strip (interactive) ---- */
.detail-chapters {
    margin-bottom: 40px;
}

.chapter-viewer {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--glass-border);
    overflow: hidden;
    margin-bottom: 16px;
}

.chapter-viewer img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chapter-strip {
    display: flex;
    flex-wrap: wrap;
    border-top: 1px solid var(--glass-border);
}

.chapter-step {
    flex: 1;
    min-width: 140px;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px 20px;
    background: none;
    border: none;
    border-right: 1px solid var(--glass-border);
    color: var(--dim);
    cursor: pointer;
    text-align: left;
    transition: color 0.3s ease, background 0.3s ease;
}

.chapter-step:last-child {
    border-right: none;
}

.chapter-step::after {
    content: '';
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: -1px;
    height: 2px;
    background: var(--proj-accent, var(--red));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.chapter-step .step-num {
    font-family: 'Livvic', sans-serif;
    font-weight: 900;
    font-size: 14px;
    color: rgba(255,255,255,0.25);
    transition: color 0.3s ease;
}

.chapter-step .step-label {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.chapter-step:hover {
    color: var(--white);
    background: rgba(255,255,255,0.02);
}

.chapter-step.active {
    color: var(--white);
}

.chapter-step.active::after {
    transform: scaleX(1);
}

.chapter-step.active .step-num {
    color: var(--proj-accent, var(--red));
}

/* ---- Exploded view with interactive hotspots ---- */
.detail-exploded {
    margin-bottom: 40px;
}

.exploded-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--glass-border);
    overflow: hidden;
}

.exploded-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hotspot {
    position: absolute;
    transform: translate(-50%, -50%);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--black);
    border: 1px solid var(--proj-accent, var(--red));
    color: var(--proj-accent, var(--red));
    font-family: 'Livvic', sans-serif;
    font-weight: 900;
    font-size: 11px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    transition: transform 0.3s ease, background 0.3s ease, color 0.3s ease;
    animation: hotspot-pulse 2.5s infinite;
}

@keyframes hotspot-pulse {
    0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 0%, transparent); }
    50% { box-shadow: 0 0 0 8px color-mix(in srgb, currentColor 15%, transparent); }
}

.hotspot::after {
    content: '';
    position: absolute;
    left: 100%;
    top: 50%;
    width: 10px;
    height: 1px;
    background: var(--proj-accent, var(--red));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.hotspot:hover,
.hotspot:focus-visible {
    background: var(--proj-accent, var(--red));
    color: var(--white);
    transform: translate(-50%, -50%) scale(1.15);
    outline: none;
}

.hotspot-label {
    position: absolute;
    left: calc(100% + 14px);
    top: 50%;
    transform: translateY(-50%);
    white-space: nowrap;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--white);
    background: rgba(13,13,13,0.85);
    border: 1px solid var(--glass-border);
    padding: 6px 10px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.hotspot:hover .hotspot-label,
.hotspot:focus-visible .hotspot-label,
.hotspot:hover::after,
.hotspot:focus-visible::after {
    opacity: 1;
}

/* ---- Frame-scrub animation: clean sequential reveal strip ---- */
.detail-animation {
    margin: clamp(56px, 7vw, 96px) 0;
}

.anim-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    cursor: ew-resize;
    touch-action: pan-y;
}

.anim-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    user-select: none;
}

.anim-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 20px;
}

.anim-play {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--white);
    background: none;
    border: 1px solid var(--glass-border);
    padding: 8px 14px;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.anim-play:hover {
    border-color: var(--proj-accent, var(--red));
    color: var(--proj-accent, var(--red));
}

.anim-bar input[type="range"] {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 2px;
    background: var(--glass-border);
    outline: none;
    cursor: pointer;
}

.anim-bar input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--proj-accent, var(--red));
    border: 2px solid var(--black);
    cursor: pointer;
}

.anim-bar input[type="range"]::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--proj-accent, var(--red));
    border: 2px solid var(--black);
    cursor: pointer;
}

/* ---- Narrative case study: image-first, whitespace-paced ---- */
.detail-narrative {
    margin-bottom: 40px;
}

/* Beats are separated by generous whitespace only — no rules, no rails */
/* Quick-view single-screen cap: each beat fits one screen, no long scroll — user spec 10 beats */
.narr-beat {
    padding: clamp(32px, 4vw, 48px) 0;
    min-height: 90vh;
    max-height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.narr-beat .narr-media {
    max-height: 60vh;
    overflow: hidden;
}
.narr-beat .narr-media img {
    max-height: 60vh;
    object-fit: contain;
}

.narr-beat:last-child {
    padding-bottom: clamp(40px, 5vw, 64px);
}

.narr-meta {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--proj-accent, var(--red));
    display: block;
    margin-bottom: 18px;
}

.narr-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: clamp(26px, 3.2vw, 42px);
    line-height: 1.15;
    letter-spacing: -0.01em;
    color: var(--narr-title, var(--white));
    max-width: 26ch;
    margin-bottom: 16px;
}

.narr-text {
    font-family: 'Montserrat', sans-serif;
    font-weight: 300;
    font-size: 15.5px;
    line-height: 1.85;
    color: var(--narr-text, var(--dim));
    max-width: 60ch;
    margin-bottom: 40px;
}

/* Images float on the page — natural size, no frames, no backgrounds */
.narr-media {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    align-items: start;
}

.narr-media:has(.narr-frame + .narr-frame) {
    grid-template-columns: 1fr 1fr;
}

.narr-media--triple {
    grid-template-columns: repeat(3, 1fr);
}

.narr-media:has(.narr-frame:nth-child(3)) {
    grid-template-columns: repeat(3, 1fr);
}

.narr-media--stack,
.narr-media.narr-media--stack,
.narr-media:has(.narr-frame + .narr-frame).narr-media--stack {
    grid-template-columns: 1fr;
}

.narr-frame {
    width: 100%;
    overflow: hidden;
}

.narr-frame img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}

.narr-video {
    grid-column: 1 / -1;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
}

/* Multiple videos (e.g. corrugated board sequence) render as a 3-up strip */
.narr-media:has(.narr-video + .narr-video) {
    grid-template-columns: repeat(3, 1fr);
}

.narr-media:has(.narr-video + .narr-video) .narr-video {
    grid-column: auto;
}

@media (max-width: 768px) {
    .narr-media:has(.narr-video + .narr-video) {
        grid-template-columns: 1fr;
    }
    .narr-media--triple,
    .narr-media:has(.narr-frame:nth-child(3)) {
        grid-template-columns: 1fr;
    }
}

/* Hidden initial states only when JS animation is active */
.detail-narrative.anim .narr-frame {
    clip-path: inset(0 0 100% 0);
}

.detail-narrative.anim .narr-frame img {
    transform: scale(1.15);
}

.detail-narrative.anim .mask {
    display: inline-block;
    overflow: hidden;
    vertical-align: bottom;
    /* descender room for heavy sans glyphs inside the clipped mask */
    padding-bottom: 0.08em;
    margin-bottom: -0.08em;
}

.detail-narrative.anim .mask-in {
    display: inline-block;
    transform: translateY(115%);
    opacity: 0;
    will-change: transform;
}

/* ---- Light theme: clean white case study (portfolio identity) ---- */
/* White pages, generous whitespace, images floating without frames.
   Accent switches from the site red to the portfolio coral. */
.project-detail.light {
    background: #ffffff;
    color: #161616;
    --proj-accent: #f4a261 !important; /* coral — wins over the JS inline accent */
    --narr-title: #161616;
    --narr-text: #4a4a4a;
}

.project-detail.light .go-back { color: #777; }
.project-detail.light .go-back:hover { color: #161616; }
.project-detail.light .detail-title { color: #161616; }
.project-detail.light .detail-desc { color: #4a4a4a; }
.project-detail.light .meta-label { color: #999; }
.project-detail.light .meta-value { color: #161616; }
.project-detail.light .detail-tags span { color: #333; }
.project-detail.light .detail-tags span + span::before { color: var(--proj-accent); }

/* Hero: the 3D render floats large and clean on white — no frame, no mat */
.project-detail.light .detail-image {
    aspect-ratio: 4 / 3;
    background: none;
    border: none;
}
.project-detail.light .detail-image img {
    object-fit: contain !important;
    /* the render only occupies 55% of its square canvas — zoom to fill */
    transform: scale(1.9);
}

/* Narrative media floats on white — nothing behind the photos */
.project-detail.light .narr-frame,
.project-detail.light .narr-frame.render,
.project-detail.light .narr-video,
.project-detail.light .anim-frame,
.project-detail.light .gal-item {
    background: none;
    border: none;
    box-shadow: none;
}

.project-detail.light .detail-story p { color: #555; }

/* Animation player: clean light controls */
.project-detail.light .anim-play {
    color: #161616;
    border-color: rgba(0,0,0,0.2);
}
.project-detail.light .anim-play:hover {
    color: var(--proj-accent);
    border-color: var(--proj-accent);
}
.project-detail.light .anim-bar input[type="range"] { background: rgba(0,0,0,0.15); }
.project-detail.light .anim-bar input[type="range"]::-webkit-slider-thumb { border-color: #ffffff; }
.project-detail.light .anim-bar input[type="range"]::-moz-range-thumb { border-color: #ffffff; }

/* Gallery thumbnails float — hover is a gentle scale, no frames */
.project-detail.light .gal-item:hover {
    transform: none;
    border-color: transparent;
    box-shadow: none;
}

.project-detail.light .detail-next a { color: #161616; }
.project-detail.light .section-caption { color: #999; }
.project-detail.light .chapter-step { color: #888; border-color: rgba(0,0,0,0.12); }
.project-detail.light .chapter-step:hover { color: #161616; background: rgba(0,0,0,0.02); }
.project-detail.light .chapter-step.active { color: #161616; }
.project-detail.light .chapter-step .step-num { color: rgba(0,0,0,0.25); }
.project-detail.light .chapter-step.active .step-num { color: var(--proj-accent); }

/* Cinematic closer: full-bleed lavender beauty shot, no page chrome.
   (gal/co01.png — lavender gradient with the kraft box and sneakers) */
.project-detail.light .detail-next {
    margin-top: clamp(64px, 8vw, 120px);
    padding-top: 0;
    border-top: none;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    position: relative;
    background: url('assets/projects/sneaker/gal/co01.png') center / cover no-repeat;
    aspect-ratio: 16 / 7;
    display: flex;
    align-items: flex-end;
}
.project-detail.light .detail-next::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15,12,10,0.55) 0%, rgba(15,12,10,0) 55%);
}
.project-detail.light .detail-next a {
    position: relative;
    color: #fff;
    justify-content: flex-start;
    font-size: clamp(22px, 3.4vw, 44px);
    padding: clamp(24px, 4vw, 56px);
}
.project-detail.light .detail-next a:hover { color: #fff; }
.project-detail.light .detail-next a::before { color: var(--proj-accent); }

/* ---- Slide hover sequence (bg image + 3-frame animation) ---- */
/* Frame height adapts to the slider's real budget (100vh minus the
   work-list, nav dots and slide info) so the frame is never clipped
   by .work-slider's overflow on shorter laptop viewports. */
.slide-image.slide-hover {
    background: #ECEAE6;
    width: 100%;
    height: calc(100vh - 400px);
    min-height: 300px;
}

.slide-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 0;
}

/* The transparent canvases (787x656) scale to fit BOTH frame
   dimensions with comfortable margins; object-fit: contain preserves
   the canvas ratio so the open-state box (89% x 87% of the canvas)
   never clips on any viewport. Dead-centered via the translate. */
.seq-img {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 88%;
    height: 82%;
    object-fit: contain;
    z-index: 1;
    opacity: 0;
    pointer-events: none;
}

.seq-img.seq-active {
    opacity: 1;
}

/* ---- SplitText masks ---- */
.split-mask {
    display: inline-block;
    overflow: hidden;
    vertical-align: bottom;
    padding-bottom: 0.12em;
    margin-bottom: -0.12em;
}

.split-mask > span,
.split-mask > div {
    display: inline-block;
    will-change: transform;
}

.split-mask-line {
    display: block;
    padding: 0.08em 0;
    margin: -0.08em 0;
}

/* ---- Disciplines marquee ---- */
#hero {
    position: relative;
}

.marquee {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    border-top: 1px solid rgba(255,255,255,0.08);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding: 18px 0;
    background: rgba(13,13,13,0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.marquee-track {
    display: flex;
    width: max-content;
    will-change: transform;
}

/* Soft edge fades so the marquee dissolves into the page */
.marquee::before,
.marquee::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 120px;
    z-index: 2;
    pointer-events: none;
}

.marquee::before {
    left: 0;
    background: linear-gradient(90deg, rgba(13,13,13,0.9) 0%, transparent 100%);
}

.marquee::after {
    right: 0;
    background: linear-gradient(270deg, rgba(13,13,13,0.9) 0%, transparent 100%);
}

.marquee-group {
    display: flex;
    align-items: center;
    gap: 28px;
    padding-right: 28px;
    white-space: nowrap;
}

.marquee-group span:not(.mq-sep) {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: rgba(255,255,255,0.55);
}

.mq-sep {
    color: var(--red);
    font-size: 8px;
}

/* ---- Magnetic buttons / tilt cards: keep CSS transitions off transform ---- */
.btn {
    transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    will-change: transform;
}

.about-right .glass-card {
    transition: background 0.3s ease, border-color 0.3s ease;
}

.about-right {
    perspective: 900px;
}

/* ---- Menu hover: letter-spacing stretch ---- */
.menu-item {
    transition: color 0.2s, letter-spacing 0.35s ease;
}

.menu-item:hover {
    letter-spacing: 0.3em;
}

/* ---- Transparent render frames: float on the page, no mat ---- */
.narr-frame.render img {
    object-fit: contain;
}

/* (light hero image treatment lives in the light-theme block above) */

/* ---- Image galleries: modular floating grid, whitespace-separated ---- */
.detail-galleries {
    margin-bottom: 40px;
}

.gal-block {
    padding: clamp(56px, 7vw, 96px) 0;
}

.gal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 28px;
    align-items: start;
}

.gal-item {
    position: relative;
    width: 100%;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    overflow: hidden;
}

.gal-item img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
    transition: transform 0.45s ease;
}

.gal-item:hover img {
    transform: scale(1.04);
}

/* ---- Lightbox ---- */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 500;
    background: rgba(13,13,13,0.94);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    pointer-events: all;
}

.lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    background: #fff;
    padding: 16px;
    box-shadow: 0 30px 80px rgba(0,0,0,0.6);
    transform: scale(0.94);
    opacity: 0;
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.35s ease;
    cursor: zoom-out;
}

.lightbox.active img {
    transform: scale(1);
    opacity: 1;
}

.lightbox-close {
    position: absolute;
    top: 24px;
    right: 32px;
    width: 44px;
    height: 44px;
    background: none;
    border: 1px solid rgba(255,255,255,0.2);
    color: var(--white);
    font-size: 22px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lightbox-close:hover {
    border-color: var(--red);
    color: var(--red);
    transform: rotate(90deg);
}

@media (max-width: 768px) {
    .narr-media:has(.narr-frame + .narr-frame) {
        grid-template-columns: 1fr;
    }
    .narr-media--triple,
    .narr-media:has(.narr-frame:nth-child(3)) {
        grid-template-columns: 1fr;
    }
}

/* Next-project link: clean bold row, arrow slides on hover */
.detail-next {
    margin-top: clamp(56px, 7vw, 96px);
    padding-top: clamp(40px, 5vw, 64px);
    border-top: 1px solid var(--glass-border);
}

.detail-next a {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: clamp(24px, 3.6vw, 48px);
    color: var(--white);
    text-decoration: none;
    transition: color 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.detail-next a::before {
    content: '→';
    font-size: 0.8em;
    color: var(--proj-accent, var(--red));
    order: 1;
    transition: transform 0.35s ease;
}

.detail-next a:hover {
    color: var(--proj-accent, var(--red));
}

.detail-next a:hover::before {
    transform: translateX(10px);
}

@media (max-width: 1024px) {
    #menu {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    #menu.open {
        transform: translateX(0);
    }

    #hamburger {
        display: flex;
    }
    
    #main {
        margin-left: 0;
    }
    
    .about-container {
        grid-template-columns: 1fr;
    }
    
    .slide {
        min-width: 80vw;
    }
}

@media (max-width: 768px) {
    .section {
        padding: 60px 30px;
    }
    
    .hero-name {
        font-size: clamp(50px, 12vw, 100px);
    }
    
    .about-right {
        grid-template-columns: 1fr;
    }
    
    .project-list {
        flex-wrap: wrap;
    }
    
    .detail-gallery {
        grid-template-columns: 1fr;
    }
}

body.menu-hidden #menu {
    transform: translateY(-100%);
}

body.menu-hidden #main {
    margin-left: 0;
}

body.menu-hidden {
    overflow: hidden;
}

@media (max-width: 768px) {
    .detail-meta {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }

    body {
        cursor: auto;
    }

    .menu-item,
    .btn,
    .glass-card,
    .nav-dot {
        cursor: pointer;
    }

    .work-slider {
        overflow-x: auto;
    }

    .slider-track {
        width: max-content;
    }

}

/* ---- Editorial structure ---- */
.section-title::before {
    content: attr(data-index);
    display: block;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 10px;
    letter-spacing: 2px;
    color: var(--red);
    margin-bottom: 12px;
}

/* ---- About quote gradient fill (scrubbed) ---- */
@media (prefers-reduced-motion: reduce) {
    .about-quote {
        background: none;
        color: var(--white);
    }
}

body.no-gsap .about-quote {
    background: none;
    color: var(--white);
}

/* ---- Experience rows hover ---- */
.experience-item {
    transition: padding-left 0.3s ease, border-color 0.3s ease;
}

.experience-item:hover {
    padding-left: 10px;
    border-color: rgba(232,0,28,0.45);
}

.experience-item:hover h4 {
    color: var(--red);
}

/* ---- Project list active underline ---- */
.project-item {
    position: relative;
}

.project-item::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -4px;
    height: 2px;
    width: 100%;
    background: var(--proj-accent, var(--red));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.project-item.active::after {
    transform: scaleX(1);
}

/* ============================================================
   Project detail — refinements (overlay layer)
   ============================================================ */

/* Center the case study on wide screens */
.detail-content {
    max-width: 1240px;
    margin: 0 auto;
}

/* Empty render containers must not leave dead vertical space */
.detail-intro:empty,
.detail-chapters:empty,
.detail-exploded:empty,
.detail-animation:empty,
.detail-galleries:empty,
.detail-narrative:empty {
    display: none;
}

/* The overlay is its own scroll container — style its scrollbar */
.project-detail {
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.16) transparent;
}

.project-detail::-webkit-scrollbar {
    width: 10px;
}

.project-detail::-webkit-scrollbar-track {
    background: transparent;
}

.project-detail::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.14);
}

.project-detail::-webkit-scrollbar-thumb:hover {
    background: var(--proj-accent, var(--red));
}

.project-detail.light {
    scrollbar-color: rgba(0,0,0,0.18) transparent;
}

.project-detail.light::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.15);
}

/* Section captions (animation player, etc.) */
.detail-animation .section-caption {
    display: block;
    margin-bottom: 20px;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .project-detail {
        padding: 28px 20px 80px;
    }

    .narr-media:has(.narr-frame + .narr-frame) {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .project-detail.light .detail-image {
        aspect-ratio: 1 / 1;
    }

    .project-detail.light .detail-image img {
        transform: scale(1.7);
    }

    .project-detail.light .detail-next {
        aspect-ratio: 4 / 5;
        align-items: flex-end;
    }

    .gal-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 16px;
    }
}

/* ============================================================
   Culture intro — full-screen opener (portfolio identity)
   ============================================================ */
/* The page OPENS with the sneaker-culture story in a single
   viewport: label, one bold statement, and the two defining
   moments side by side. Everything floats on white. */
.detail-intro {
    position: relative;
    box-sizing: border-box;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 64px 0 48px;
    margin: 0 auto clamp(48px, 6vw, 80px);
}

.intro-label {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--proj-accent, var(--red));
    width: 100%;
    margin: 0 auto 20px;
    text-align: center;
}

.intro-statement {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: clamp(36px, 5.5vw, 76px);
    line-height: 1.05;
    letter-spacing: -0.015em;
    color: #161616;
    width: 100%;
    max-width: 15ch;
    margin: 0 auto 20px;
    text-align: center;
}

.intro-sub {
    font-family: 'Montserrat', sans-serif;
    font-weight: 300;
    font-size: clamp(15px, 1.7vw, 18px);
    line-height: 1.7;
    color: #4a4a4a;
    width: 100%;
    max-width: 54ch;
    margin: 0 auto clamp(28px, 4vh, 44px);
    text-align: center;
}

.intro-panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(24px, 3vw, 56px);
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    justify-items: center;
    align-items: start;
}

.intro-panel {
    margin: 0;
}

.intro-frame {
    display: flex;
    justify-content: center;
}

.intro-frame img {
    display: block;
    max-width: 100%;
    max-height: 40vh;
    width: auto;
    height: auto;
}

.intro-caption {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 4px;
    margin-top: 12px;
    font-family: 'Montserrat', sans-serif;
    width: 100%;
}

.intro-caption strong {
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #161616;
}

.intro-caption span:last-child {
    font-weight: 300;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #999;
}

/* Scroll cue — only present because the intro fills the viewport */
.intro-scroll {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: #999;
}

.intro-scroll::before {
    content: '';
    width: 1px;
    height: 28px;
    background: var(--proj-accent, var(--red));
    transform-origin: top;
    animation: intro-scroll-pulse 2.2s ease-in-out infinite;
}

@keyframes intro-scroll-pulse {
    0%, 100% { transform: scaleY(0.4); opacity: 0.4; }
    50% { transform: scaleY(1); opacity: 1; }
}

/* Hidden initial states only when the intro animation is active */
.detail-intro.anim .intro-label,
.detail-intro.anim .intro-statement,
.detail-intro.anim .intro-sub,
.detail-intro.anim .intro-panel {
    opacity: 0;
    transform: translateY(30px);
}

.detail-intro.anim .intro-frame {
    clip-path: inset(0 0 100% 0);
}

.detail-intro.anim .intro-frame img {
    transform: scale(1.12);
}

.detail-intro.anim .intro-scroll {
    opacity: 0;
}

/* Back button floats over the intro screen on light pages */
.project-detail.light .go-back {
    position: absolute;
    top: 28px;
    left: clamp(20px, 5vw, 80px);
    margin: 0;
    width: auto;
    z-index: 10;
}

@media (max-width: 768px) {
    .detail-intro {
        min-height: auto;
        padding: 96px 0 56px;
    }

    .intro-statement {
        font-size: clamp(30px, 8.5vw, 42px);
    }

    .intro-panels {
        grid-template-columns: 1fr;
        gap: 40px;
        max-width: 420px;
    }

    .intro-frame img {
        max-height: 42vh;
    }
}

/* ============================================================
   Pages model: 3 separate full-screen pages, no page scroll.
   Only one section is visible at a time (menu switches pages).
   ============================================================ */
html, body {
    height: 100%;
}

body {
    overflow: hidden;
}

#main .section {
    display: none;
    height: 100vh;
    height: 100dvh;
    min-height: 0;
}

#main #hero {
    display: flex;
}

#main #hero.section:not(.active) {
    display: none;
}

body.no-gsap {
    overflow: auto;
}

body.no-gsap #main .section.active {
    display: flex;
    height: auto;
    min-height: 100vh;
    overflow: visible;
}

body.no-gsap #work.section.active {
    display: block;
}

#main .section.active {
    display: flex;
    overflow-y: auto;
}

#work.section.active {
    display: block;
}

#about.section.active {
    display: block;
}

#hero {
    padding-top: 70px;
    padding-bottom: 90px;
}

#work {
    padding: 32px 0 20px;
}

.work-container.watch {
    min-height: 0;
    height: 100%;
}

.watch-head {
    margin-bottom: 12px;
}

.watch-project-name {
    font-size: clamp(28px, 4.5vw, 64px);
    white-space: nowrap;
}

.work-container.watch .watch-viewport {
    height: auto;
    flex: 1 1 auto;
    min-height: 300px;
}

.about-container {
    margin: 0 auto;
    padding-bottom: 60px;
}

#about::-webkit-scrollbar {
    width: 10px;
}

#about::-webkit-scrollbar-track {
    background: transparent;
}

#about::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.14);
}

#about::-webkit-scrollbar-thumb:hover {
    background: var(--red);
}

/* ============================================================
   Gallery — browsable dump of every project image
   ============================================================ */
#gallery.section.active {
    display: block;
}

body.no-gsap #gallery.section.active {
    display: block;
}

.archive-container {
    max-width: 1240px;
    margin: 0 auto;
    padding-bottom: 60px;
}

.archive-head {
    padding: 0 60px;
    margin-bottom: 32px;
}

.archive-title {
    font-family: 'Livvic', sans-serif;
    font-weight: 900;
    font-size: clamp(40px, 6vw, 84px);
    line-height: 1.02;
    letter-spacing: -0.01em;
    color: var(--white);
}

.arch-group-label {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 11px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--proj-accent, var(--red));
    padding: 0 60px;
    margin: 40px 0 16px;
    display: block;
}

.arch-grid {
    columns: 280px;
    column-gap: 16px;
    padding: 0 60px;
}

.arch-item {
    break-inside: avoid;
    display: block;
    width: 100%;
    margin: 0 0 16px;
    padding: 0;
    background: none;
    border: 1px solid transparent;
    cursor: pointer;
    overflow: hidden;
}

.arch-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.45s ease;
}

.arch-item:hover img {
    transform: scale(1.03);
}

.arch-item:hover {
    border-color: var(--proj-accent, var(--red));
}

#gallery::-webkit-scrollbar {
    width: 10px;
}

#gallery::-webkit-scrollbar-track {
    background: transparent;
}

#gallery::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.14);
}

#gallery::-webkit-scrollbar-thumb:hover {
    background: var(--red);
}

@media (max-width: 768px) {
    .archive-head,
    .arch-group-label,
    .arch-grid {
        padding-left: 30px;
        padding-right: 30px;
    }
}

/* ---- Project dot rail: numbered jump-to-project dots ---- */
.proj-dots {
    display: flex;
    gap: 10px;
    padding: 0;
    flex-shrink: 0;
}

.proj-dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.35);
    background: transparent;
    color: rgba(255,255,255,0.55);
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 9px;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease, width 0.3s ease, height 0.3s ease, font-size 0.3s ease;
}

.proj-dot:hover {
    border-color: var(--white);
    color: var(--white);
    transform: scale(1.15);
}

.proj-dot.active {
    width: 30px;
    height: 30px;
    font-size: 10px;
    background: var(--proj-accent, var(--red));
    border-color: var(--proj-accent, var(--red));
    color: #0d0d0d;
    transform: scale(1.12);
    box-shadow: 0 0 28px color-mix(in srgb, var(--proj-accent, var(--red)) 55%, transparent);
}

@media (max-width: 900px) {
    .watch-head {
        flex-wrap: wrap;
    }
    .proj-dots {
        flex-wrap: wrap;
    }
}

/* ============================================================
   About — contact, capabilities tabs, experience accordion
   ============================================================ */
.about-contact {
    font-family: 'Montserrat', sans-serif;
    font-weight: 300;
    font-size: 13px;
    letter-spacing: 1px;
    color: var(--dim);
    margin-bottom: 28px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.about-contact a {
    color: var(--white);
    text-decoration: none;
    border-bottom: 1px solid rgba(232,0,28,0.5);
    transition: color 0.3s ease, border-color 0.3s ease;
}

.about-contact a:hover {
    color: var(--red);
    border-color: var(--red);
}

.about-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 48px;
}

.experience-item {
    padding: 0;
}

.exp-head {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: none;
    border: none;
    padding: 15px 0;
    text-align: left;
    font: inherit;
    color: inherit;
}

.exp-head-static {
    padding: 15px 0;
    display: flex;
    align-items: baseline;
    gap: 16px;
}

.exp-num {
    font-family: 'Livvic', sans-serif;
    font-weight: 900;
    font-size: 15px;
    color: var(--red);
    flex-shrink: 0;
    min-width: 28px;
}

.exp-now {
    display: inline-block;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 9px;
    letter-spacing: 2px;
    text-transform: uppercase;
    background: var(--red);
    color: var(--white);
    border-radius: 99px;
    padding: 3px 10px;
    margin-left: 10px;
    vertical-align: 2px;
}

.exp-plus {
    font-family: 'Montserrat', sans-serif;
    font-weight: 300;
    font-size: 22px;
    line-height: 1;
    color: var(--red);
    transition: transform 0.35s ease;
    flex-shrink: 0;
}

.experience-item.open .exp-plus {
    transform: rotate(45deg);
}

.exp-body {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.exp-body > div {
    overflow: hidden;
}

.experience-item.open .exp-body {
    grid-template-rows: 1fr;
}

.exp-body ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 2px 0 12px;
}

.exp-body li {
    font-family: 'Montserrat', sans-serif;
    font-weight: 300;
    font-size: 13px;
    line-height: 1.65;
    color: var(--dim);
    padding-left: 18px;
    position: relative;
}

.exp-body li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 9px;
    width: 7px;
    height: 2px;
    background: var(--red);
}

.exp-body span {
    display: block;
    padding-bottom: 18px;
}

/* ============================================================
   Watch-grid Projects (Apple Watch-style square cluster)
   ============================================================ */
#work {
    padding: 100px 0 60px 0;
    display: block;
}

.work-container.watch {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 100vh;
    justify-content: center;
}

.watch-head {
    padding: 0 60px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.watch-titles {
    min-width: 0;
}

.watch-head .section-title {
    margin-bottom: 8px;
}

.watch-hint {
    font-family: 'Montserrat', sans-serif;
    font-weight: 300;
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--dim);
}

.watch-viewport {
    position: relative;
    width: 100%;
    height: 72vh;
    min-height: 480px;
    overflow: hidden;
    cursor: grab;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

.watch-viewport:active {
    cursor: grabbing;
}

.watch-field {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 4380px;
    height: 2700px;
    will-change: transform;
}

.watch-app {
    position: absolute;
    left: var(--bx);
    top: var(--by);
    transform: translate(-50%, -50%);
    width: 168px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    will-change: transform, opacity;
}

.watch-tile {
    position: relative;
    display: block;
    width: 168px;
    height: 168px;
    border-radius: 0;
    overflow: hidden;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--glass-border);
    box-shadow: 0 18px 50px rgba(0,0,0,0.45);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Case-study indicator: accent dot on tiles that open a full page.
   Gallery-only tiles (data-detail="0") get no dot and open a lightbox. */
.watch-app[data-detail="1"] .watch-tile::after {
    content: '';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--proj-accent, var(--red));
    box-shadow: 0 0 0 3px rgba(0,0,0,0.35);
}

.watch-kicker-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 8px;
}

.watch-kicker {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 11px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--dim);
}

.watch-legend {
    font-family: 'Montserrat', sans-serif;
    font-weight: 300;
    font-size: 10px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.35);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.watch-legend i {
    display: block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--red);
}

.watch-project-name {
    font-family: 'Livvic', sans-serif;
    font-weight: 900;
    font-size: clamp(40px, 6vw, 84px);
    line-height: 1.02;
    letter-spacing: -0.01em;
    color: var(--white);
    max-width: 16ch;
    will-change: transform;
}

.watch-meta {
    font-family: 'Montserrat', sans-serif;
    font-weight: 300;
    font-size: 13px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--dim);
    margin-top: 10px;
}

.watch-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

/* Fit mode: whole image visible, no clipping, on white. */
.watch-app[data-fit="contain"] .watch-tile {
    background: #fff;
}

.watch-app[data-fit="contain"] .watch-tile img {
    object-fit: contain;
}

.watch-app:hover .watch-tile,
.watch-app:focus-visible .watch-tile,
.watch-app.focused .watch-tile {
    border-color: var(--proj-accent, var(--red));
    box-shadow: 0 18px 60px rgba(0,0,0,0.55), 0 0 0 2px var(--proj-accent, var(--red));
    outline: none;
}

.watch-label {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 11px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.75);
    display: flex;
    align-items: baseline;
    gap: 6px;
    white-space: nowrap;
}

.watch-label em {
    font-style: normal;
    color: var(--proj-accent, var(--red));
    font-size: 10px;
}

@media (max-width: 768px) {
    .watch-head {
        padding: 0 30px;
    }
    .watch-viewport {
        height: 64vh;
        min-height: 420px;
    }
    .watch-app {
        width: 132px;
    }
    .watch-tile {
        width: 132px;
        height: 132px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .watch-viewport {
        cursor: default;
    }
}