/* ================================
   RESET & BASE STYLES
   ================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --font-base: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --color-bg: #ffffff;
    --color-text: #0a0a0a;
    --color-text-light: #5b5b5b;
    --color-accent: #0a0a0a;
    --color-border: #b3b3b3;
    --hero-text: #f7f2ea;
    --hero-muted: rgba(247, 242, 234, 0.82);
    --hero-overlay: linear-gradient(120deg, rgba(12, 10, 9, 0.58) 0%, rgba(20, 16, 14, 0.58) 38%, rgba(12, 10, 9, 0.48) 100%);
    --hero-glow: radial-gradient(70% 70% at 20% 15%, rgba(238, 210, 168, 0.12), rgba(255, 255, 255, 0) 50%),
        radial-gradient(80% 80% at 80% 10%, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0) 55%);
    --hero-noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.22'/%3E%3C/svg%3E");
    --spacing-xs: 1rem;
    --spacing-sm: 2rem;
    --spacing-md: 4rem;
    --spacing-lg: 6rem;
    --spacing-xl: 8rem;
    --transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    /* iOS Safari viewport height fix - set by JS */
    --vh: 1vh;
    /* Safe area insets with fallbacks */
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left: env(safe-area-inset-left, 0px);
    --safe-right: env(safe-area-inset-right, 0px);
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    overscroll-behavior-y: none;
}

html,
body {
    scroll-snap-type: y mandatory;
}

html.no-snap,
html.no-snap body {
    scroll-snap-type: none !important;
}

html.no-snap .hero,
html.no-snap .parallax-spacer,
html.no-snap .portfolio-selection {
    scroll-snap-align: none !important;
    scroll-snap-stop: normal !important;
}

html.no-snap .parallax-spacer {
    height: 0 !important;
}

html.no-snap:not(.touch-device) .portfolio-selection {
    position: relative !important;
    min-height: auto !important;
    height: auto !important;
    overflow: visible !important;
}

html.no-snap:not(.touch-device) .portfolio-selection .container {
    height: auto !important;
}

html.internal-scroll,
body.internal-scroll {
    scroll-snap-type: none !important;
    overflow-y: auto !important;
    overscroll-behavior-y: auto;
}

body.internal-scroll {
    -webkit-overflow-scrolling: touch;
}

body {
    font-family: var(--font-base);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overscroll-behavior-y: none;
}


.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

@media (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }
}

/* ================================
   HERO SECTION
   ================================ */

.hero {
    min-height: 100vh;
    min-height: 100svh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: var(--spacing-md) 0;
    overflow: hidden;
    transform-origin: center top;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    z-index: 2;
    background: radial-gradient(120% 120% at 30% 10%, rgba(243, 227, 200, 0.18), rgba(246, 241, 232, 0)),
        radial-gradient(120% 120% at 70% 0%, rgba(218, 193, 147, 0.18), rgba(246, 241, 232, 0)),
        #0a0806;
    width: 100%;
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.4),
        0 40px 100px rgba(0, 0, 0, 0.5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    isolation: isolate;
    color: var(--hero-text);
    transition: box-shadow 0.4s ease, border-bottom 0.4s ease, opacity 0.28s ease;
}

.hero.remove-shadow {
    box-shadow: none;
    border-bottom-color: transparent;
}

.hero.remove-shadow::before,
.hero.remove-shadow::after {
    opacity: 0;
}

.hero::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -40px;
    height: 160px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.12) 45%, rgba(0, 0, 0, 0) 100%);
    filter: blur(26px);
    opacity: 0.9;
    z-index: 3;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.hero-media {
    position: absolute;
    inset: 0;
    box-sizing: border-box;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    background: #000;
}

.hero-bg-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(115%) contrast(105%) brightness(1.06);
    opacity: 0;
    transition: opacity 0.35s ease;
}

.hero-bg-video[data-hero-frame-ready="1"] {
    opacity: 1;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        var(--hero-overlay),
        var(--hero-glow);
    background-size: cover, cover;
    mix-blend-mode: normal;
    opacity: 0.82;
    pointer-events: none;
}

.hero.soften .hero-media {
    filter: blur(2px) saturate(0.8) contrast(0.95) brightness(0.95);
}

.hero.soften .hero-overlay {
    opacity: 0.94;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

/* Used by mobile/iPad reveal logic in script.js */
.hero.mobile-reveal-transition {
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: transform;
}

.parallax-spacer {
    height: 100vh;
    height: 100svh;
    height: 100dvh;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    pointer-events: none;
    transition: opacity 0.28s ease;
}

.hero-title {
    font-size: clamp(3rem, 12vw, 9rem);
    font-family: var(--font-display);
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 0.9;
    margin-bottom: 0.1rem;
    text-transform: uppercase;
    opacity: 0;
    animation: fadeIn 2.5s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
    will-change: opacity;
    color: var(--hero-text);
    text-shadow:
        0 36px 120px rgba(0, 0, 0, 0.98),
        0 0 40px rgba(0, 0, 0, 0.95);
}

.hero::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -280px;
    height: 240px;
    background: radial-gradient(80% 80% at 50% 0%, rgba(0, 0, 0, 0.24), transparent 70%);
    z-index: 1;
    pointer-events: none;
    filter: blur(10px);
    opacity: 0.75;
    transition: opacity 0.4s ease;
}

.hero .container {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-areas:
        "title"
        "intro"
        "contact";
    gap: 0.1rem;
}

.hero-title {
    grid-area: title;
}

.hero-intro {
    grid-area: intro;
    max-width: 650px;
    margin-bottom: var(--spacing-lg);
}

.hero-intro .intro-text {
    margin: 0;
}

.hero-title,
.hero-intro,
.hero-intro .intro-text,
.hero-intro .word-reveal {
    cursor: default;
}

.hero .contact-wrapper {
    grid-area: contact;
    margin-top: var(--spacing-md);
}

.word-reveal {
    display: inline-block;
    opacity: 0;
    white-space: pre-wrap;
    animation: fadeWord 2s ease-out forwards;
    will-change: opacity;
}

@keyframes fadeWord {
    0% {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeIn {
    0% {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.intro-text {
    font-size: clamp(0.95rem, 1.4vw, 1.2rem);
    font-weight: 300;
    color: var(--hero-muted);
    margin-bottom: 1rem;
    line-height: 1.55;
    letter-spacing: -0.01em;
    text-shadow: 0 6px 32px rgba(0, 0, 0, 0.45);
    white-space: normal;
}

.scroll-indicator {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    transform: translateY(100%);
    text-align: center;
    opacity: 0;
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 1.5s forwards;
    will-change: transform, opacity;
    transition: opacity 0.3s ease-out;
    padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
    z-index: 2;
    cursor: pointer;
}

.scroll-arrow {
    position: relative;
    width: 22px;
    height: 30px;
    margin: 0 auto;
    animation: bounce 2s infinite;
    cursor: pointer;
}

.scroll-arrow::before,
.scroll-arrow::after {
    content: "";
    position: absolute;
    left: 50%;
    width: 13px;
    height: 13px;
    border-right: 3px solid var(--hero-text);
    border-bottom: 3px solid var(--hero-text);
    transform: translateX(-50%) rotate(45deg);
    opacity: 0.9;
}

.scroll-arrow::before {
    top: 2px;
    opacity: 0.25;
}

.scroll-arrow::after {
    top: 12px;
    opacity: 0.55;
}

@keyframes fadeInUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

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

@keyframes fadeInUpCenter {
    to {
        opacity: 1;
    }
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(10px);
    }
}

.scroll-indicator.hidden {
    display: none;
    opacity: 0 !important;
    pointer-events: none;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.sound-toggle {
    position: absolute;
    right: clamp(1rem, 4vw, 2.5rem);
    bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.25rem;
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(247, 242, 234, 0.25);
    background: rgba(10, 10, 10, 0.35);
    color: var(--hero-text);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
    isolation: isolate;
}

.sound-toggle::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 999px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: -1;
    pointer-events: none;
}

.sound-toggle:hover {
    transform: translateY(-2px);
    background: rgba(10, 10, 10, 0.45);
    border-color: rgba(247, 242, 234, 0.4);
}

.sound-toggle:focus-visible {
    outline: 2px solid rgba(247, 242, 234, 0.7);
    outline-offset: 2px;
}

/* ================================
   ACTING TEASER
   ================================ */

.acting-teaser {
    padding: var(--spacing-xl) 0;
}

.acting-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.acting-image-wrapper {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 8px;
    aspect-ratio: 16 / 9;
}

.acting-image {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f5f5f5 0%, #e5e5e5 100%);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-placeholder {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.acting-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.acting-overlay span {
    color: white;
    font-size: 1.5rem;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.acting-image-wrapper:hover .acting-overlay {
    opacity: 1;
}

.acting-image-wrapper:hover .acting-image {
    transform: scale(1.05);
}

/* ================================
   CATEGORIES
   ================================ */

.categories {
    padding: var(--spacing-md) 0;
}

.category {
    margin-bottom: var(--spacing-md);
    position: relative;
    cursor: default;
}

.category-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.35rem;
}

.category-title {
    font-size: clamp(1.65rem, 4.4vw, 2.7rem);
    font-weight: 800;
    margin-bottom: 0;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    position: relative;
    display: inline-block;
    padding-bottom: 0;
}

.category-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: currentColor;
    transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.category-title:hover::after {
    width: 100%;
}

.category:hover .category-title::after {
    width: 100%;
}

.category-more {
    font-size: 0.72rem;
    font-weight: 700;
    font-family: inherit;
    color: currentColor;
    line-height: 1.1;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
    padding-bottom: 0.08rem;
    background-image: linear-gradient(currentColor, currentColor);
    background-repeat: no-repeat;
    background-position: left bottom;
    background-size: 0 1px;
    transition: background-size 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.category-more:hover,
.category-more:focus-visible {
    background-size: 100% 1px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 0.8rem;
}

.grid-item {
    cursor: default;
}

.item-image {
    position: relative;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 4 / 3;
    cursor: pointer;
    background: linear-gradient(135deg, #f5f5f5 0%, #e5e5e5 100%);
    border-radius: 4px;
    margin-bottom: 0.55rem;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.item-image.tile-image-loading,
.gallery-image.tile-image-loading,
.category-detail-image.tile-image-loading {
    background-image: linear-gradient(120deg, #f1f1f1 20%, #e4e4e4 45%, #f1f1f1 70%);
    background-size: 200% 100%;
    animation: tilePlaceholderPulse 1.1s ease-in-out infinite;
}

.item-image.tile-image-fade-pending,
.gallery-image.tile-image-fade-pending,
.category-detail-image.tile-image-fade-pending {
    opacity: 0;
}

.item-image.tile-image-fade-in,
.gallery-image.tile-image-fade-in,
.category-detail-image.tile-image-fade-in {
    animation: tileImageFadeIn 0.36s ease-out both;
}

.item-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: transparent;
    opacity: 1;
    transition: opacity 0.18s ease;
}

.item-video-static,
.category-detail-video-static {
    opacity: 1;
    pointer-events: none;
}

.item-video[data-preview-frame-ready="0"],
.category-detail-video-thumb[data-preview-frame-ready="0"] {
    opacity: 0;
}

.item-video[data-preview-frame-ready="1"],
.category-detail-video-thumb[data-preview-frame-ready="1"] {
    opacity: 1;
}

.item-video-badge {
    position: absolute;
    left: 0.45rem;
    bottom: 0.45rem;
    padding: 0.18rem 0.38rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.72);
    color: #fff;
    font-size: 0.56rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    z-index: 2;
}

.item-brand {
    font-size: 0.78rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-light);
}

/* ================================
   GALLERY
   ================================ */

.gallery {
    padding: var(--spacing-md) 0;
    background: #fafafa;
}

.section-title {
    font-size: clamp(2rem, 4.8vw, 3.2rem);
    font-weight: 800;
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 0.75rem;
}

.gallery-item {
    cursor: pointer;
}

.gallery-image {
    position: relative;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 3 / 2;
    background: linear-gradient(135deg, #e5e5e5 0%, #d5d5d5 100%);
    border-radius: 4px;
    margin-bottom: 0.5rem;
    transition: var(--transition);
}

.gallery-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: transparent;
}

.gallery-brand {
    font-size: 0.76rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-light);
}

/* ================================
   CATEGORY DETAIL PAGE
   ================================ */

.category-detail-section {
    padding: var(--spacing-sm) 0 var(--spacing-lg);
}

.category-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.7rem;
}

.category-detail-item {
    cursor: pointer;
}

.category-detail-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 4px;
    background: linear-gradient(135deg, #e5e5e5 0%, #d5d5d5 100%);
    background-size: cover;
    background-position: center;
    margin-bottom: 0.45rem;
}

@keyframes tilePlaceholderPulse {
    0% {
        background-position: 100% 0;
    }

    100% {
        background-position: 0 0;
    }
}

@keyframes tileImageFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.category-detail-video-poster {
    position: relative;
    overflow: hidden;
}

.category-detail-video-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(140deg, #2f2f2f 0%, #1a1a1a 100%);
}

.category-detail-video-placeholder-label {
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 999px;
    padding: 0.26rem 0.52rem;
    line-height: 1;
    pointer-events: none;
}

.category-detail-video-thumb {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: transparent;
    transition: opacity 0.18s ease;
}

.category-detail-brand {
    font-size: 0.74rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-text-light);
}

.category-detail-empty {
    font-size: 0.82rem;
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.category-load-more {
    margin: 1.2rem auto 0;
    display: flex;
    width: fit-content;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    font-size: 0.73rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text);
    background: #fff;
    cursor: pointer;
    transition: var(--transition);
}

.category-load-more:hover,
.category-load-more:focus-visible {
    transform: translateY(-1px);
    border-color: var(--color-text);
}

.category-load-more.hidden {
    display: none;
}

.category-load-sentinel {
    width: 100%;
    height: 1px;
    margin-top: 1px;
    pointer-events: none;
}

.category-load-sentinel.hidden {
    display: none;
}

.category-lightbox {
    position: fixed;
    inset: 0;
    z-index: 2200;
    background: rgba(0, 0, 0, 0.88);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease;
}

.category-lightbox.active {
    opacity: 1;
    pointer-events: auto;
}

.category-lightbox-media-wrap {
    width: min(92vw, 1200px);
    height: min(82vh, 900px);
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: pan-y;
}

.category-lightbox-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 6px;
}

.category-lightbox-video,
.category-lightbox-frame {
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 6px;
    background: #000;
}

.category-lightbox-video {
    object-fit: contain;
}

.category-lightbox-close,
.category-lightbox-prev,
.category-lightbox-next {
    position: absolute;
    border: 0;
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    cursor: pointer;
    line-height: 1;
}

.category-lightbox-close {
    top: 1rem;
    right: 1rem;
    width: 2.3rem;
    height: 2.3rem;
    border-radius: 999px;
    font-size: 1.35rem;
}

.category-lightbox-prev,
.category-lightbox-next {
    top: 50%;
    transform: translateY(-50%);
    width: 2.7rem;
    height: 2.7rem;
    border-radius: 999px;
    font-size: 1.5rem;
}

.category-lightbox-prev {
    left: 1rem;
}

.category-lightbox-next {
    right: 1rem;
}

.category-lightbox-caption {
    position: absolute;
    left: 50%;
    bottom: 1rem;
    transform: translateX(-50%);
    color: #fff;
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

body.lightbox-open {
    overflow: hidden;
}

/* ================================
   FOOTER
   ================================ */

.footer {
    padding: var(--spacing-md) 0;
    text-align: center;
    border-top: 1px solid var(--color-border);
}

.footer p {
    font-size: 0.875rem;
    color: var(--color-text-light);
    font-weight: 400;
}

/* ================================
   ACTING PAGE
   ================================ */

.nav {
    padding: 2rem 0;
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    z-index: 100;
}

.nav-back {
    text-decoration: none;
    color: var(--color-text);
    font-weight: 500;
    font-size: 0.9375rem;
    letter-spacing: 0.02em;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-back:hover {
    opacity: 0.6;
}

.acting-header {
    padding: var(--spacing-lg) 0 var(--spacing-md) 0;
    text-align: center;
}

.page-title {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
    opacity: 0;
    animation: fadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
}

.page-subtitle {
    font-size: 1.25rem;
    color: var(--color-text-light);
    font-weight: 300;
    opacity: 0;
    animation: fadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.4s forwards;
}

.acting-work {
    padding: var(--spacing-md) 0 var(--spacing-xl) 0;
}

.work-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 3rem;
}

@media (max-width: 768px) {
    .work-grid {
        grid-template-columns: 1fr;
    }
}

.work-item {
    opacity: 0;
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.work-item.visible {
    opacity: 1;
}

.video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

/* .work-item:hover .video-wrapper removed */

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.work-title {
    font-size: 1.125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ================================
   CONTACT FORM
   ================================ */

.contact-section {
    padding: var(--spacing-md) 0 var(--spacing-xl) 0;
}

.contact-intro {
    text-align: center;
    font-size: 1.25rem;
    margin-bottom: 3rem;
    opacity: 0;
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.contact-intro.visible {
    opacity: 1;
}

.contact-intro p {
    color: var(--color-text);
    line-height: 1.6;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    opacity: 0;
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.contact-form.visible {
    opacity: 1;
}

.form-group {
    margin-bottom: 2rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    color: var(--color-text);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    font-family: inherit;
    color: var(--color-text);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-text);
    box-shadow: 0 0 0 2px rgba(10, 10, 10, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

.submit-btn {
    display: block;
    width: 100%;
    padding: 1rem 2.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-bg);
    background: var(--color-text);
    border: 1px solid var(--color-text);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    background: var(--color-bg);
    color: var(--color-text);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.submit-btn:active {
    transform: translateY(0);
}

.contact-modal {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 10, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.24s ease, visibility 0.24s ease;
    z-index: 2400;
}

.contact-modal.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.contact-modal-card {
    width: min(100%, 560px);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 2rem 1.5rem;
    text-align: center;
    transform: translateY(14px);
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.contact-modal.is-open .contact-modal-card {
    transform: translateY(0);
}

.contact-modal-card h2 {
    margin: 0 0 0.75rem 0;
    font-size: clamp(1.25rem, 2.2vw, 1.6rem);
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.contact-modal-card p {
    margin: 0 0 1.5rem 0;
    line-height: 1.6;
}

.contact-modal-close {
    width: auto;
    min-width: 170px;
    margin: 0 auto;
}

body.modal-open {
    overflow: hidden;
}

@media (max-width: 768px) {
    .contact-section {
        padding: var(--spacing-sm) 0 var(--spacing-lg) 0;
    }

    .contact-form {
        max-width: 100%;
        padding: 0 1rem;
    }

    .contact-intro {
        font-size: 1.125rem;
        padding: 0 1rem;
        margin-bottom: 2rem;
    }

    .form-group {
        margin-bottom: 1.5rem;
    }

    .form-group label {
        font-size: 0.813rem;
    }

    .form-group input,
    .form-group textarea {
        padding: 0.875rem;
        font-size: 1rem;
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
    }

    .form-group textarea {
        min-height: 120px;
    }

    .submit-btn {
        font-size: 1rem;
        padding: 0.875rem 2rem;
    }

    .contact-modal-card {
        padding: 1.75rem 1.125rem;
    }

    .contact-modal-card p {
        margin-bottom: 1.25rem;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .contact-intro {
        font-size: 1rem;
    }

    .form-group input,
    .form-group textarea {
        font-size: 0.938rem;
    }

    .submit-btn {
        font-size: 0.938rem;
    }
}

/* ================================
   SCROLL ANIMATIONS
   ================================ */

[data-scroll] {
    opacity: 0;
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-scroll].visible {
    opacity: 1;
}

/* ================================
   CONTACT LINK
   ================================ */

.contact-wrapper {
    text-align: center;
    margin-top: var(--spacing-md);
}

.hero .contact-wrapper {
    position: relative;
    margin-top: clamp(2rem, 8vh, 6rem);
    z-index: 2;
    transform: none;
    left: auto;
    bottom: auto;
    opacity: 0;
    animation: fadeIn 4.5s cubic-bezier(0.16, 1, 0.3, 1) 1s forwards;
    will-change: opacity;
}

.contact-link {
    display: inline-block;
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--color-text);
    text-decoration: none;
    padding: 1rem 2.5rem;
    border: 1px solid var(--color-border);
    background: var(--color-bg);
    transition: var(--transition);
    letter-spacing: 0.02em;
    border-radius: 9999px;
}

.contact-link:hover {
    background: var(--color-text);
    color: var(--color-bg);
    border-color: var(--color-text);
}

/* Header-Specific Contact Link Override: Option C Underline Only */
/* Placed here to override generic hover states */
.contact-link.glass-action {
    background: transparent;
    border: none;
    /* Permanent underline removed for Option B */
    padding: 0 0 2px 0;
    /* Minimal padding */
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 0.8125rem;
    letter-spacing: 0.08em;
    color: var(--color-text);
    text-transform: uppercase;
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 0;
    position: relative;
    /* Needed for absolute ::after */
    margin-right: 0;
    margin-left: auto;
    width: max-content;
    top: auto;
}

/* Animated Underline */
.contact-link.glass-action::after {
    content: '';
    position: absolute;
    bottom: -2px;
    /* Gap from text */
    left: 0;
    width: 0;
    /* Starte hidden */
    height: 1px;
    background: var(--color-text);
    transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: block;
}

.contact-link.glass-action::before {
    display: none;
    content: none;
}

.contact-link.glass-action:hover {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    color: var(--color-text) !important;
    box-shadow: none !important;
}

.contact-link.glass-action:hover::after {
    width: 100%;
    /* Expand on hover */
}

/* Social Nav in Header */
.glass-right {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    justify-self: end;
}

.glass-sep {
    color: var(--color-text);
    opacity: 0.2;
    font-size: 0.7rem;
    line-height: 1;
    user-select: none;
    pointer-events: none;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text);
    opacity: 0.55;
    transition: opacity 0.28s ease;
}

.social-icon:hover {
    opacity: 1;
}

.social-icon svg {
    width: 0.8125rem;
    height: 0.8125rem;
}

.contact-icon {
    display: none;
}

.hero .contact-link {
    color: var(--hero-text);
    border-color: rgba(247, 242, 234, 0.35);
    background: rgba(247, 242, 234, 0.12);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.hero .contact-link:hover {
    background: rgba(247, 242, 234, 0.2);
    color: var(--hero-text);
    border-color: rgba(247, 242, 234, 0.55);
}

/* ================================
   MINIMAL HERO & PORTFOLIO SELECTION
   ================================ */

.hero-minimal {
    min-height: 100vh;
    min-height: 100svh;
    min-height: 100dvh;
    padding-bottom: 0;
    display: flex;
    align-items: center;
}

.hero-minimal .container {
    /* Offset to position content in upper portion of hero */
    /* On mobile this is handled separately to avoid iOS Safari issues */
    transform: translateY(min(30svh, 24vh));
}

.hero-minimal .hero-title {
    margin-bottom: var(--spacing-sm);
    animation: fadeInSemiTransparent 2.5s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
}

@keyframes fadeInSemiTransparent {
    0% {
        opacity: 0;
    }

    to {
        opacity: 0.8;
    }
}

.hero-minimal .hero-intro {
    margin-bottom: 0;
}

.portfolio-selection,
.internal-page {
    background: #ffffff;
    position: relative;
    overflow-x: hidden;
}

.portfolio-selection::before,
.internal-page::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(120% 120% at 30% 20%, rgba(0, 0, 0, 0.025), transparent 50%),
        radial-gradient(140% 140% at 80% 0%, rgba(0, 0, 0, 0.02), transparent 60%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.12'/%3E%3C/svg%3E");
    opacity: 0.18;
    pointer-events: none;
    z-index: 0;
    mix-blend-mode: multiply;
}

.portfolio-selection {
    padding: 0;
    min-height: 100vh;
    min-height: 100svh;
    min-height: 100dvh;
    display: flex;
    align-items: stretch;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1;
    pointer-events: auto;
    overflow: hidden;
    transition: opacity 0.28s ease;
}

.portfolio-selection .container {
    max-width: none;
    width: 100%;
    padding: calc(var(--spacing-md) + 60px) var(--spacing-md) var(--spacing-md);
    height: 100vh;
    height: 100svh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.glass-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    margin: 0;
    background: #ffffff;
    /* Solid white */
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.04);
    /* Ambient Glow */
    z-index: 3;
    isolation: isolate;
}

.page-glass-header {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0.55));
    backdrop-filter: blur(24px) saturate(200%);
    -webkit-backdrop-filter: blur(24px) saturate(200%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* SPA global header */
.global-header {
    position: fixed;
    top: 0;
    z-index: 5;
    border-bottom-color: transparent;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.global-header::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.62);
    opacity: 0;
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.42s cubic-bezier(0.22, 0.61, 0.36, 1), opacity 0.24s ease;
    pointer-events: none;
}

body.suppress-header-transition .global-header {
    transition: none;
}

body.suppress-header-transition .global-header::after {
    transition: none;
}

body.suppress-header-transition.has-global-header .global-header {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

body.suppress-header-transition.has-global-header .global-header::after {
    opacity: 1;
    transform: scaleX(1);
}

body.has-global-header .portfolio-header {
    display: none;
}

body.has-global-header:not(.is-subpage):not(.show-header) .global-header {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: none;
}

body.has-global-header:not(.is-subpage):not(.show-header) .global-header::after {
    opacity: 0;
    transform: scaleX(0);
}

body.has-global-header.show-header .global-header::after,
body.is-subpage .global-header::after {
    opacity: 1;
    transform: scaleX(1);
}

/* Suppress hero flash when navigating back from a subpage */
body.from-portfolio .hero {
    visibility: hidden;
}

/* Prevent first-paint flash of stale default copy before portfolio-loader applies data */
body.portfolio-content-pending #heroTitle,
body.portfolio-content-pending #introText1,
body.portfolio-content-pending #introText2,
body.portfolio-content-pending #card1Title,
body.portfolio-content-pending #card1Subtitle,
body.portfolio-content-pending #card2Title,
body.portfolio-content-pending #card2Subtitle,
body.portfolio-content-pending #card3Title,
body.portfolio-content-pending #card3Subtitle {
    visibility: hidden;
}

/* Hide hardcoded card thumbnails until dynamic data has been resolved.
   This prevents a one-frame flash of default images before live thumbnails render. */
body.portfolio-content-pending .portfolio-card[data-portfolio="acting"] .portfolio-card-media,
body.portfolio-content-pending .portfolio-card[data-portfolio="content"] .portfolio-card-media {
    background-image: none !important;
}

/* Internal portfolio pages ship placeholder category titles/order in static HTML.
   Keep them hidden until portfolio-loader applies the live config. */
body.portfolio-content-pending #contentPageTitle,
body.portfolio-content-pending #visualPageTitle,
body.portfolio-content-pending .categories .category {
    visibility: hidden;
}

/* SPA page swapping */
.spa-content {
    display: none;
    opacity: 0;
    transition: opacity 0.28s ease;
}

body.is-subpage .spa-content {
    display: block;
    opacity: 1;
}

body.spa-transition-out-portfolio .hero,
body.spa-transition-out-portfolio .portfolio-selection,
body.spa-transition-out-portfolio .parallax-spacer,
body.spa-transition-in-portfolio .hero,
body.spa-transition-in-portfolio .portfolio-selection,
body.spa-transition-in-portfolio .parallax-spacer {
    opacity: 0;
}

body.is-subpage .hero,
body.is-subpage .portfolio-selection,
body.is-subpage .parallax-spacer {
    display: none;
}

html.is-subpage,
body.is-subpage {
    scroll-snap-type: none;
}

/* Page body enter / exit transitions */
.page-body {
    animation: pageBodyEnter 0.52s cubic-bezier(0.22, 1, 0.36, 1);
}

.page-body.exit {
    animation: pageBodyExit 0.46s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes pageBodyEnter {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

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

@keyframes pageBodyExit {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(24px);
    }
}

@keyframes pageBodyEnterFade {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes pageBodyExitFade {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

.glass-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem var(--spacing-sm);
    max-width: none;
    margin: 0 auto;
    width: 100%;
}

.glass-spacer {
    display: block;
    min-width: 80px;
    height: 1px;
    opacity: 0;
}

.glass-title {
    font-size: clamp(0.875rem, 2vw, 1.125rem);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-text);
    text-align: center;
    margin: 0;
    grid-column: 2;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.glass-title:hover {
    opacity: 0.7;
}

.glass-back {
    font-family: var(--font-display);
    font-size: 0.8125rem;
    /* Match Contact */
    color: var(--color-text);
    text-decoration: none;
    text-transform: uppercase;
    /* Match Contact */
    font-weight: 500;
    letter-spacing: 0.08em;
    /* Match Contact */
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0 0.2rem 0 0;
    /* Add right padding to prevent underline clipping */
    transition: var(--transition);
    justify-self: start;
    background: transparent;
    border: none;
    position: relative;
}

.glass-back-icon {
    display: inline-block;
    transform-origin: 50% 50%;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-back-label {
    display: inline-block;
    transform: translateY(0);
    opacity: 1;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.16s ease;
}

#globalBack.is-label-leaving .glass-back-label {
    opacity: 0;
    transform: translateY(-0.32em);
}

#globalBack.is-label-entering .glass-back-label {
    opacity: 0;
    transform: translateY(0.32em);
}

#globalBack[data-mode="home"] .glass-back-icon {
    transform: rotate(90deg);
}

#globalBack[data-mode="back"] .glass-back-icon {
    transform: rotate(0deg);
}

.glass-back::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--color-text);
    transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* .glass-back:hover empty ruleset removed */

.glass-back:hover::after {
    width: 100%;
}





/* Section Title (below header) */
.section-header {
    padding: var(--spacing-md) 0 var(--spacing-sm);
    text-align: center;
}

.section-header-title {
    font-size: clamp(2rem, 6.6vw, 4.1rem);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    line-height: 1.04;
    margin: 0;
}

.portfolio-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
}

.portfolio-heading {
    font-size: clamp(1.5rem, 4vw, 2.8rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    text-transform: uppercase;
    color: var(--color-text);
    text-align: center;
    margin: 0;
    grid-column: 2;
}

.portfolio-contact {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.6rem;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--color-text);
    text-decoration: none;
    border-radius: 9999px;
    border: 1px solid var(--color-border);
    transition: var(--transition);
    background: transparent;
    grid-column: 3;
    justify-self: end;
}

.portfolio-contact:hover {
    background: var(--color-text);
    color: var(--color-bg);
    border-color: var(--color-text);
}

/* ================================
   PORTFOLIO GRID & MODERN LAYOUT
   ================================ */

.portfolio-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 3fr 2fr;
    width: 100%;
    height: 100%;
    gap: 1.5rem;
    perspective: 1000px;
}

/* Tile exit transition for portfolio-to-subpage navigation (all breakpoints) */
.portfolio-grid.tiles-exit .portfolio-card {
    opacity: 0;
    will-change: transform, opacity;
    transition: transform 0.44s cubic-bezier(0.22, 0.61, 0.36, 1), opacity 0.36s ease;
    transition-delay: 0s, 0s;
    pointer-events: none;
}

.portfolio-grid.tiles-exit .portfolio-card:nth-child(1) {
    transition-delay: 0s, 0s;
    transform: translate3d(-135%, 0, 0);
}

.portfolio-grid.tiles-exit .portfolio-card:nth-child(2) {
    transition-delay: 0s, 0s;
    transform: translate3d(135%, 0, 0);
}

.portfolio-grid.tiles-exit .portfolio-card:nth-child(3) {
    transition-delay: 0s, 0s;
    transform: translate3d(0, 130%, 0);
}

.portfolio-grid.tiles-exit.tiles-exit-focus-acting .portfolio-card[data-portfolio="acting"],
.portfolio-grid.tiles-exit.tiles-exit-focus-content .portfolio-card[data-portfolio="content"],
.portfolio-grid.tiles-exit.tiles-exit-focus-visual .portfolio-card[data-portfolio="visual"] {
    transition-delay: 0.12s, 0.12s;
}

/* Reverse direction entry when returning from subpages */
.portfolio-grid.tiles-enter .portfolio-card,
.portfolio-grid.tiles-enter.cards-revealed .portfolio-card {
    opacity: 0;
    will-change: transform, opacity;
    transition: transform 0.44s cubic-bezier(0.22, 0.61, 0.36, 1), opacity 0.36s ease;
    transition-delay: 0s, 0s;
    pointer-events: none;
}

.portfolio-grid.tiles-enter .portfolio-card:nth-child(1) {
    transform: translate3d(-135%, 0, 0);
}

.portfolio-grid.tiles-enter .portfolio-card:nth-child(2) {
    transform: translate3d(135%, 0, 0);
}

.portfolio-grid.tiles-enter .portfolio-card:nth-child(3) {
    transform: translate3d(0, 130%, 0);
}

.portfolio-grid.tiles-enter.tiles-enter-active .portfolio-card,
.portfolio-grid.tiles-enter.tiles-enter-active.cards-revealed .portfolio-card {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

@media (prefers-reduced-motion: reduce) {
    .portfolio-grid.tiles-exit .portfolio-card,
    .portfolio-grid.tiles-enter.tiles-enter-active .portfolio-card {
        transition-duration: 0.01ms;
    }
}

/* Vertical line removed */

.portfolio-card {
    position: relative;
    border-radius: 4px;
    text-decoration: none;
    color: var(--color-text);
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    padding: 0;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    background: linear-gradient(135deg, #f5f5f5 0%, #e5e5e5 100%);
}

.portfolio-image-wrapper {
    position: relative;
    flex: 1;
    width: 100%;
    border-radius: 4px;
    overflow: hidden;
    background: #000;
}

.portfolio-card+.portfolio-card {
    border-left: 0;
}

/* removed dark slider overlay */
.portfolio-card::before {
    display: none;
}

.portfolio-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 2;
    text-align: left;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 1.125rem 1.25rem;
    /* Tighter Bold Poster padding */
    background: transparent;
    color: #ffffff;
    pointer-events: none;
}

.portfolio-card-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* Sit flush at bottom */
    padding: clamp(1.5rem, 3vw, 2.5rem);
    /* Add padding back to container */

    /* Clean, Simple Gradient for legibility - REMOVED */
    background: transparent;

    /* Remove aggressive blur/noise */
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    mask-image: none;
    -webkit-mask-image: none;

    z-index: 2;
    border-radius: 0 0 4px 4px;
    /* Clip to card */
    border: none;

    /* Subtle Entry Animation */
    transform: translateY(0);
    opacity: 1;
    transition:
        transform 0.5s cubic-bezier(0.25, 1, 0.5, 1),
        opacity 0.4s ease;
}

.portfolio-card:hover .portfolio-card-content {
    transform: translateY(-2px);
}

/* Restore the 'Pop' (Match Visual Portfolio) */
.portfolio-card:hover {
    /* transform: translateY(-4px) scale(1.005);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4); */
    z-index: 10;
    /* Ensure it sits on top */
}

.portfolio-card:hover .portfolio-card-content {
    color: #ffffff;
    /* Keep white on hover */
}

.portfolio-card-title {
    font-size: clamp(2rem, 3.5vw, 4rem);
    font-weight: 900;
    margin-bottom: 0;
    letter-spacing: -0.06em;
    line-height: 0.85;
    text-transform: uppercase;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.title-suffix {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    opacity: 0.7;
    margin-top: 0;
    margin-left: 0.2rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #ffffff;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

/* ================================
   DRAWING BORDER — title block
   ================================ */

.portfolio-title-block {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.4rem 0.55rem;
    background: transparent;
    border: 1px solid transparent;
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    /* glass retract — fast */
    transition: background 0.18s ease, backdrop-filter 0.18s ease, -webkit-backdrop-filter 0.18s ease;
}

/* glass settles into place as border finishes drawing */
.portfolio-card:hover .portfolio-title-block {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    transition:
        background 0.35s cubic-bezier(0.16, 1, 0.3, 1) 0.05s,
        backdrop-filter 0.35s cubic-bezier(0.16, 1, 0.3, 1) 0.05s,
        -webkit-backdrop-filter 0.35s cubic-bezier(0.16, 1, 0.3, 1) 0.05s;
}

.portfolio-title-block::before,
.portfolio-title-block::after {
    content: '';
    position: absolute;
    pointer-events: none;
}

/* Top + Left edges — retract state (fast, reverse order) */
.portfolio-title-block::before {
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.55);
    border-left: 1px solid rgba(255, 255, 255, 0.55);
    transition: height 0.12s ease, width 0.12s ease 0.08s;
}

/* Bottom + Right edges — retract state (fast, reverse order) */
.portfolio-title-block::after {
    bottom: 0;
    right: 0;
    width: 0;
    height: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.55);
    border-right: 1px solid rgba(255, 255, 255, 0.55);
    transition: width 0.12s ease, height 0.12s ease 0.08s;
}

/* Hover-in: draw clockwise — top → right → bottom → left */
.portfolio-card:hover .portfolio-title-block::before {
    width: 100%;
    height: 100%;
    transition: width 0.14s ease, height 0.14s ease 0.32s;
}

.portfolio-card:hover .portfolio-title-block::after {
    width: 100%;
    height: 100%;
    transition: height 0.14s ease 0.12s, width 0.14s ease 0.24s;
}

/* Caption container styling */
.portfolio-caption {
    padding: 0.75rem 1.25rem 0;
    text-align: left;
}

.portfolio-card-description {
    font-size: 0.8125rem;
    font-weight: 500;
    opacity: 0.7;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    text-align: left;
    color: var(--color-text);
}

/* .portfolio-card-arrow removed */

.portfolio-card.thumb-card {
    align-items: flex-end;
    justify-content: flex-start;
    padding: clamp(1.75rem, 3vw, 2.5rem);
    color: #f7f7f7;
}

.portfolio-card.thumb-card::before {
    display: none;
}

/* removed empty ruleset for .portfolio-card.thumb-card:hover::before */

.portfolio-card-media {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: 50% 40%;
    filter: none;
    transform: none;
    transition: filter 0.9s ease;
    z-index: 0;
    overflow: hidden;
}

/* removed zoom/vibrancy hover */

/* .portfolio-card:hover .portfolio-card-media empty ruleset removed */

/* .portfolio-card-media::after { display: none; } REMOVED or handled */

.portfolio-card-media::after {
    display: none;
}

.portfolio-card.thumb-card:hover .portfolio-card-media {
    /* No filter alteration on hover */
    filter: none;
}

.portfolio-card.thumb-card:hover .portfolio-card-media::after,
.portfolio-card.thumb-card:hover .portfolio-card-media::before {
    opacity: 0.15;
}

.portfolio-card[data-portfolio="content"] .portfolio-card-media {
    background-image: url('assets/portfolio-content-default.jpg');
    background-image: -webkit-image-set(
        url('assets/portfolio-content-default.webp') 1x,
        url('assets/portfolio-content-default.jpg') 1x
    );
    background-image: image-set(
        url('assets/portfolio-content-default.webp') type('image/webp') 1x,
        url('assets/portfolio-content-default.jpg') type('image/jpeg') 1x
    );
}

.portfolio-card[data-portfolio="content"] .portfolio-card-media::after {
    background: linear-gradient(180deg, rgba(230, 173, 135, 0.5) 0%, rgba(204, 138, 112, 0.5) 45%, rgba(158, 106, 82, 0.58) 100%);
}

.portfolio-card[data-portfolio="acting"] .portfolio-card-media {
    background-image: url('assets/portfolio-acting-default.jpg');
    background-image: -webkit-image-set(
        url('assets/portfolio-acting-default.webp') 1x,
        url('assets/portfolio-acting-default.jpg') 1x
    );
    background-image: image-set(
        url('assets/portfolio-acting-default.webp') type('image/webp') 1x,
        url('assets/portfolio-acting-default.jpg') type('image/jpeg') 1x
    );
    background-position: 50% 55%;
}

.portfolio-card[data-portfolio="acting"] .portfolio-card-media::after {
    background: linear-gradient(180deg, rgba(126, 183, 182, 0.5) 0%, rgba(94, 146, 150, 0.5) 45%, rgba(58, 92, 98, 0.58) 100%);
}

.portfolio-card.thumb-card .portfolio-card-content {
    align-items: flex-start;
    text-align: left;
    color: #f7f7f7;
    gap: 0.25rem;
}

/* removed empty ruleset for .portfolio-card.thumb-card .portfolio-card-title */

.portfolio-card.thumb-card .portfolio-card-description {
    opacity: 0.9;
    letter-spacing: 0.08em;
}

.portfolio-card.thumb-card .portfolio-card-arrow {
    color: #fdfdfd;
    font-size: 1.75rem;
}

.portfolio-card.thumb-card:hover .portfolio-card-arrow {
    transform: translateX(14px);
}

/* ================================
   COMPACT PORTFOLIO CARDS
   ================================ */

.portfolio-card-compact {
    height: 100%;
}

.portfolio-card-compact .portfolio-card-title {
    font-size: clamp(2rem, 3.5vw, 4rem);
}

/* ================================
   VISUAL PORTFOLIO CAROUSEL
   ================================ */

/* ================================
   VISUAL PORTFOLIO CAROUSEL
   ================================ */

.portfolio-card-visual {
    grid-column: 1 / -1;
    height: auto;
    min-height: 0;
    height: 100%;
    display: flex;
    /* Changed to flex to control layout better */
    flex-direction: row;
    align-items: center;
    padding: 0;
    position: relative;
    overflow: hidden;
    background: transparent;
    border-radius: 4px;
    /* Global 4px radius clipping */
    text-decoration: none;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.6s ease;
    box-shadow: none;
}

.portfolio-card-visual::before {
    display: none;
}

.portfolio-card-visual:hover {
    /* transform: translateY(-4px) scale(1.005);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4); */
    z-index: 5;
}



.visual-carousel-wrapper {
    width: 100%;
    /* Full width per request */
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 0;
    z-index: 0;
    /* Behind text (which is z-index 30) */
    display: flex;
    align-items: center;
    justify-content: center;
    mask-image: none;
    -webkit-mask-image: none;
}

/* Discrete Stepped Carousel (3 Visible) */
.visual-carousel-wrapper {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 0;
    z-index: 0;
    /* Behind text */
    overflow: hidden;
    mask-image: none;
    -webkit-mask-image: none;
    background: transparent;
    container-type: inline-size;
}

.visual-carousel {
    display: flex;
    flex-direction: row;
    gap: 24px;
    width: 100%;
    /* Will hold items */
    height: 100%;
    transform: translate3d(0, 0, 0);
    will-change: transform;
    /* Animation handled by JS for discrete steps */
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Pause interaction not needed for discrete clicks/interval, but kept for safety */
.portfolio-card-visual:hover .visual-carousel {
    /* No pause needed for JS interval usually, or handled in JS */
}

.carousel-item {
    position: relative;
    top: auto;
    left: auto;
    width: calc((100% - 48px) / 3);
    width: calc((100cqw - 48px) / 3);
    box-sizing: border-box;
    height: 100%;

    flex: 0 0 auto;
    opacity: 1 !important;
    z-index: 1;

    transform: none !important;
    border-radius: 4px;
    overflow: hidden;
    background-color: transparent;
    box-shadow: none;
    pointer-events: none;

    /* Removed filters to prevent 'color change' on hover */
    filter: none;
    transition: filter 0.3s ease;

    margin: 0;
    padding: 10px 0;
}

/* Active State - irrelevant in marquee but good for safety */
.carousel-item.state-active {
    opacity: 1;
    transform: none;
}

.carousel-image {
    width: 100%;
    height: 100%;
    border-radius: 4px;
    background-size: cover;
    background-position: center;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    filter: none;
    transition: transform 0.5s ease, filter 0.55s ease;
}

/* Hover Effect: Just remove grayscale, no brightness boost */
.portfolio-card-visual:hover .carousel-item {
    filter: none;
    /* No change on hover */
}

.carousel-item:hover .carousel-image {
    background-size: cover;
}

/* Remove old State Classes */
/* All items are equal in the strip */

/* --- STATE CLASSES --- */

/* Old State Classes Removed for Infinite Loop */

/* Hover effects */
.carousel-item:hover .carousel-image {
    transform: scale(1.05);
}

/* Hover effects */
/* Old specific state hovers removed */

/* Clean Visual Content (Matches Standard Cards) */
.visual-content {
    position: absolute;
    bottom: 0;
    left: 0;
    top: auto;
    right: auto;
    width: 100%;
    transform: none;
    z-index: 30;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 1.125rem 1.25rem;
    text-align: left;

    /* Clean, Simple Gradient for legibility (No Blur) - REMOVED */
    background: transparent;
    pointer-events: none;

    /* Subtle Entry Animation */
    transform: translateY(0);
    opacity: 1;
    transition:
        transform 0.5s cubic-bezier(0.25, 1, 0.5, 1),
        opacity 0.4s ease;
}

/* Remove the aggressive blur/noise pseudo-element */
.visual-content::before {
    display: none;
}

.portfolio-card-visual:hover .visual-content {
    transform: translateY(-2px);
    color: #ffffff;
}

.portfolio-card-visual:focus-visible .visual-content {
    transform: translateY(-2px);
    color: #ffffff;
}

.portfolio-card-visual .portfolio-card-title {
    font-size: clamp(2rem, 3.5vw, 4rem);
    font-weight: 900;
    margin-bottom: 0;
    letter-spacing: -0.06em;
    line-height: 0.85;
    text-transform: uppercase;
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    mix-blend-mode: normal;
}

.portfolio-card-visual .title-suffix {
    font-size: 0.8125rem;
    /* Matches .portfolio-card-description */
    font-weight: 500;
    opacity: 0.7;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    text-align: left;
    color: #ffffff;

    /* Reset previous unique styles */
    font-family: inherit;
    line-height: inherit;
    max-width: none;
    display: block;
    padding-left: 0;
}

.portfolio-card-visual .title-suffix::before {
    display: none;
}

/* ================================
   PAGE HEADER (for sub-pages)
   ================================ */

.page-header {
    padding: var(--spacing-md) 0 var(--spacing-sm);
    border-bottom: 1px solid var(--color-border);
    margin-bottom: var(--spacing-lg);
}

.page-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.back-link {
    font-size: 0.95rem;
    color: var(--color-text);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.back-link:hover {
    opacity: 0.6;
    transform: translateX(-5px);
}

.page-title {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    flex: 1;
    text-align: center;
}

/* ================================
   RESPONSIVE DESIGN - MOBILE FIRST
   ================================ */

/* Touch device detection - disable hover effects */
/* Also target .touch-device class added by JavaScript */
html.touch-device .portfolio-card:hover,
html.touch-device .portfolio-card:hover .portfolio-card-content,
html.touch-device .portfolio-card-visual:hover,
html.touch-device .portfolio-card-visual:hover .visual-content,
html.touch-device .grid-item:hover .item-image,
html.touch-device .gallery-item:hover .gallery-image,
html.touch-device .acting-image-wrapper:hover .acting-overlay,
html.touch-device .acting-image-wrapper:hover .acting-image,
html.touch-device .carousel-item:hover .carousel-image {
    transform: none !important;
}

html.touch-device .portfolio-card:hover .portfolio-title-block::before,
html.touch-device .portfolio-card:hover .portfolio-title-block::after {
    width: 0 !important;
    height: 0 !important;
}

html.touch-device .portfolio-card:hover .portfolio-title-block {
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

html.touch-device .glass-back:hover::after,
html.touch-device .contact-link.glass-action:hover::after,
html.touch-device .category-title:hover::after,
html.touch-device .category:hover .category-title::after {
    width: 0 !important;
}

html.touch-device .sound-toggle:hover {
    transform: none !important;
}

@media (hover: none) and (pointer: coarse) {

    /* Disable all hover transforms and effects on touch devices */
    .portfolio-card:hover,
    .portfolio-card:hover .portfolio-card-content,
    .portfolio-card-visual:hover,
    .portfolio-card-visual:hover .visual-content,
    .grid-item:hover .item-image,
    .gallery-item:hover .gallery-image,
    .acting-image-wrapper:hover .acting-overlay,
    .acting-image-wrapper:hover .acting-image,
    .carousel-item:hover .carousel-image {
        transform: none !important;
    }

    /* Disable drawing border animation on touch */
    .portfolio-card:hover .portfolio-title-block::before,
    .portfolio-card:hover .portfolio-title-block::after {
        width: 0 !important;
        height: 0 !important;
    }

    .portfolio-card:hover .portfolio-title-block {
        background: transparent !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }

    /* Disable underline animations */
    .glass-back:hover::after,
    .contact-link.glass-action:hover::after,
    .category-title:hover::after,
    .category:hover .category-title::after {
        width: 0 !important;
    }

    /* Remove sound toggle hover effect */
    .sound-toggle:hover {
        transform: none !important;
    }

    /* Improve touch feedback with active states instead */
    .portfolio-card:active {
        opacity: 0.9;
        transform: scale(0.995) !important;
    }

    .glass-back:active,
    .glass-title:active,
    .contact-link:active,
    .sound-toggle:active {
        opacity: 0.7;
    }
}

/* ================================
   TABLET BREAKPOINT (1024px)
   ================================ */

@media (max-width: 1024px) {
    :root {
        --spacing-md: 3rem;
        --spacing-lg: 4rem;
        --spacing-xl: 5rem;
    }

    .category-grid {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

/* ================================
   MOBILE BREAKPOINT (768px)
   ================================ */

@media (max-width: 768px) {
    :root {
        --spacing-xs: 0.75rem;
        --spacing-sm: 1.25rem;
        --spacing-md: 1.5rem;
        --spacing-lg: 2rem;
        --spacing-xl: 2.5rem;
    }

    /* Disable scroll snap on mobile - causes iOS Safari issues */
    html,
    body {
        scroll-snap-type: none !important;
        -webkit-overflow-scrolling: touch;
    }

    /* Base container with safe areas */
    .container {
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
    }

    /* ====== HERO SECTION MOBILE ====== */
    .hero {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        height: -webkit-fill-available;
        min-height: 100vh;
        min-height: 100svh;
        min-height: 100dvh;
        scroll-snap-align: none;
        scroll-snap-stop: normal;
        padding: 0;
        border-bottom: none;
        box-shadow:
            0 2px 8px rgba(0, 0, 0, 0.18),
            0 14px 36px rgba(0, 0, 0, 0.16);
    }

    .hero::before {
        bottom: -22px;
        height: 92px;
        background: linear-gradient(180deg, rgba(0, 0, 0, 0.14) 0%, rgba(0, 0, 0, 0.04) 55%, rgba(0, 0, 0, 0) 100%);
        filter: blur(16px);
        opacity: 0.44;
    }

    .hero::after {
        bottom: -140px;
        height: 128px;
        background: radial-gradient(76% 76% at 50% 0%, rgba(0, 0, 0, 0.1), transparent 72%);
        filter: blur(8px);
        opacity: 0.36;
    }

    .hero-minimal {
        height: 100vh;
        height: -webkit-fill-available;
        min-height: 100vh;
        min-height: 100svh;
        min-height: 100dvh;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .hero .container {
        padding-top: calc(var(--spacing-md) + env(safe-area-inset-top));
        padding-bottom: calc(var(--spacing-md) + env(safe-area-inset-bottom));
    }

    .hero-minimal .container {
        padding-top: calc(var(--spacing-lg) + env(safe-area-inset-top));
        padding-bottom: calc(var(--spacing-md) + env(safe-area-inset-bottom));
    }

    /* Vertical offset to position text lower like desktop */
    .hero-minimal .container {
        transform: translateY(min(24svh, 20vh));
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: flex-start;
        padding-top: env(safe-area-inset-top);
    }

    /* Mobile hero title - readable on small screens */
    .hero-title {
        font-size: clamp(2.25rem, 11vw, 4rem);
        letter-spacing: -0.03em;
        line-height: 0.95;
        margin-bottom: 1rem;
    }

    /* Mobile intro text - prevent tiny text */
    .intro-text {
        font-size: clamp(0.875rem, 3.5vw, 1rem);
        white-space: normal;
        line-height: 1.5;
    }

    .hero-intro {
        max-width: 100%;
        margin-bottom: var(--spacing-md);
    }

    /* Contact wrapper positioning */
    .hero .contact-wrapper {
        margin-top: var(--spacing-sm);
        position: relative;
    }

    .contact-link {
        padding: 0.875rem 1.75rem;
        font-size: 1rem;
        min-height: 48px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* ====== PARALLAX SPACER - DISABLE ON MOBILE ====== */
    .parallax-spacer {
        height: 0 !important;
        min-height: 0 !important;
        scroll-snap-align: none;
        scroll-snap-stop: normal;
        display: none;
    }

    /* ====== SCROLL INDICATOR ====== */
    .scroll-indicator {
        bottom: 0;
        padding-bottom: calc(1.5rem + env(safe-area-inset-bottom));
    }

    /* ====== HERO REVEAL TRANSITION ====== */
    .hero.mobile-reveal-transition {
        transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    }

    /* ====== SOUND TOGGLE ====== */
    .sound-toggle {
        right: max(1rem, env(safe-area-inset-right));
        bottom: calc(1rem + env(safe-area-inset-bottom));
        min-height: 44px;
        min-width: 44px;
        padding: 0.5rem 0.875rem;
        font-size: 0.6875rem;
    }

    /* ====== PORTFOLIO SECTION MOBILE ====== */
    .portfolio-selection {
        position: fixed !important;
        top: 0;
        left: 0;
        width: 100%;
        min-height: 100dvh;
        height: 100dvh;
        overflow: hidden;
        z-index: 1;
    }

    /* Override the global html.no-snap rule that forces relative */
    html.no-snap .portfolio-selection {
        position: fixed !important;
        min-height: 100dvh !important;
        height: 100dvh !important;
        overflow: hidden !important;
    }

    .portfolio-selection .container {
        height: 100%;
        padding: 0;
        /* Header height + equal 0.75rem gap above and below cards */
        padding-top: calc(44px + 1.25rem + 0.75rem + env(safe-area-inset-top));
        padding-bottom: calc(0.75rem + env(safe-area-inset-bottom));
        padding-left: max(0.75rem, env(safe-area-inset-left));
        padding-right: max(0.75rem, env(safe-area-inset-right));
        display: flex;
        flex-direction: column;
    }

    /* ====== GLASS HEADER MOBILE ====== */
    .glass-header {
        position: sticky;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-width: none;
        z-index: 100;
        flex-shrink: 0;
    }

    /* Global header stays fixed — must come after .glass-header to win */
    .global-header {
        position: fixed;
    }

    /* Animate global header in/out on mobile (fixed position so opacity is safe) */
    body.has-global-header:not(.show-header):not(.is-subpage) .global-header {
        opacity: 0;
        pointer-events: none;
        transform: translateY(-12px);
        transition: opacity 0.35s ease, transform 0.35s ease;
    }

    body.has-global-header.header-hide-instant:not(.show-header):not(.is-subpage) .global-header {
        transition: none;
    }

    body.has-global-header.show-header .global-header {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
        transition: opacity 0.35s ease, transform 0.35s ease;
    }

    .glass-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
        align-items: center;
        gap: 0.5rem;
        padding: calc(0.625rem + env(safe-area-inset-top)) max(0.75rem, env(safe-area-inset-right)) 0.625rem max(0.75rem, env(safe-area-inset-left));
        max-width: none;
    }

    /* All header elements - 44px min tap target */
    .glass-title,
    .portfolio-heading {
        font-size: clamp(0.8125rem, 3.5vw, 1rem);
        text-align: center;
        letter-spacing: 0.04em;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        grid-column: 2;
        justify-self: center;
        padding: 0 0.25rem;
    }

    .glass-back {
        display: inline-flex;
        min-height: 44px;
        min-width: 44px;
        align-items: center;
        justify-content: flex-start;
        font-size: 0.8125rem;
        padding: 0 0.5rem;
        flex-shrink: 0;
        justify-self: start;
    }

    .glass-action.contact-link {
        border: none;
        padding: 0.5rem 0.75rem;
        font-size: 0.8125rem;
        line-height: 1;
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        justify-self: end;
    }

    .glass-action.contact-link::after {
        display: none;
    }

    .glass-right {
        gap: 0;
    }

    .glass-right .contact-link.glass-action,
    .glass-sep {
        display: none;
    }

    .contact-icon {
        display: inline-flex;
    }

    .glass-right .social-icon,
    .glass-right .contact-icon {
        min-height: 44px;
        padding: 0 0.4rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .portfolio-contact {
        padding: 0.5rem 0.875rem;
        font-size: 0.875rem;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }

    /* Hide back button on portfolio section - not needed */
    .portfolio-selection .glass-back {
        display: none;
    }

    .portfolio-selection .glass-header .glass-row {
        padding: calc(0.625rem + env(safe-area-inset-top)) max(0.75rem, env(safe-area-inset-right)) 0.625rem max(0.75rem, env(safe-area-inset-left));
    }

    .glass-spacer {
        display: none;
    }

    /* ====== PORTFOLIO GRID MOBILE ====== */
    .portfolio-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 1.4fr 1fr;
        gap: 0.35rem;
        height: 100%;
        width: 100%;
        padding: 0;
        perspective: none;
        flex: 1;
        min-height: 0;
    }

    .portfolio-grid::before {
        display: none;
    }

    /* ====== PORTFOLIO CARDS MOBILE ====== */
    .portfolio-card {
        min-height: 0;
        max-height: none;
        width: 100%;
        height: auto;
        aspect-ratio: auto;
        flex: 1;
        padding: 0;
        border-radius: 6px;
        margin-bottom: 0;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        -webkit-tap-highlight-color: transparent;
    }

    .portfolio-card-compact {
        height: 100%;
        min-height: 0;
        aspect-ratio: auto;
    }

    .portfolio-card-content {
        padding: 0.9rem 1rem;
    }

    .portfolio-image-wrapper {
        width: 100%;
        height: 100%;
        flex: 1;
        position: relative;
        min-height: 0;
        border-radius: 6px;
    }

    .portfolio-card-content {
        padding: 0.75rem 1rem;
    }

    /* Tap affordance chevron on all cards */
    .portfolio-card::after {
        content: '';
        position: absolute;
        bottom: 1.125rem;
        right: 0.875rem;
        z-index: 35;
        width: 10px;
        height: 10px;
        border-right: 2px solid rgba(255, 255, 255, 0.85);
        border-top: 2px solid rgba(255, 255, 255, 0.85);
        transform: rotate(45deg);
        pointer-events: none;
    }

    .portfolio-card-title {
        font-size: clamp(1.5rem, 6vw, 2.25rem);
        line-height: 0.95;
    }

    .title-suffix {
        font-size: 0.6875rem;
        letter-spacing: 0.08em;
        margin-top: 0.25rem;
    }

    .portfolio-caption {
        padding: 0.5rem 0.75rem;
        flex-shrink: 0;
    }

    /* ====== CARD ENTRANCE ANIMATION ====== */
    .portfolio-grid .portfolio-card {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }

    .portfolio-grid.cards-revealed .portfolio-card {
        opacity: 1;
        transform: translateY(0);
    }

    .portfolio-grid.cards-revealed .portfolio-card:nth-child(1) {
        transition-delay: 0.05s;
    }

    .portfolio-grid.cards-revealed .portfolio-card:nth-child(2) {
        transition-delay: 0.18s;
    }

    .portfolio-grid.cards-revealed .portfolio-card:nth-child(3) {
        transition-delay: 0.31s;
    }

    /* Keep return animation timing stable on mobile (override cards-revealed delays). */
    .portfolio-grid.tiles-enter.cards-revealed .portfolio-card:nth-child(1),
    .portfolio-grid.tiles-enter.cards-revealed .portfolio-card:nth-child(2),
    .portfolio-grid.tiles-enter.cards-revealed .portfolio-card:nth-child(3),
    .portfolio-grid.tiles-enter.tiles-enter-active.cards-revealed .portfolio-card:nth-child(1),
    .portfolio-grid.tiles-enter.tiles-enter-active.cards-revealed .portfolio-card:nth-child(2),
    .portfolio-grid.tiles-enter.tiles-enter-active.cards-revealed .portfolio-card:nth-child(3) {
        transition-delay: 0s, 0s;
    }

    /* Prevent top-right tile (2nd card) from hitching on re-entry on mobile. */
    .portfolio-grid.tiles-enter .portfolio-card:nth-child(2),
    .portfolio-grid.tiles-enter.cards-revealed .portfolio-card:nth-child(2),
    .portfolio-grid.tiles-enter.tiles-enter-active .portfolio-card:nth-child(2),
    .portfolio-grid.tiles-enter.tiles-enter-active.cards-revealed .portfolio-card:nth-child(2) {
        transition-delay: 0s, 0s !important;
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
    }

    /* ====== VISUAL PORTFOLIO CARD MOBILE ====== */
    .portfolio-card-visual {
        min-height: 0;
        max-height: none;
        aspect-ratio: auto;
        grid-column: 1 / -1;
    }

    .visual-carousel-wrapper {
        min-height: 0;
        max-height: none;
        height: 100%;
    }

    .visual-carousel {
        gap: 0;
        padding: 0;
        height: 100%;
    }

    .carousel-item {
        width: 100%;
        max-width: none;
        height: 100%;
        padding: 0;
    }

    .carousel-image {
        border-radius: 6px;
    }

    .visual-content {
        width: 100%;
        background: transparent;
        padding: 0.75rem 0.875rem;
        justify-content: flex-start;
    }

    .portfolio-card-visual .portfolio-card-title {
        font-size: clamp(1.5rem, 6vw, 2.25rem);
    }

    .portfolio-card-visual .title-suffix {
        font-size: 0.6875rem;
        letter-spacing: 0.08em;
        margin-top: 0.25rem;
    }

    /* ====== SECTION HEADERS ====== */
    .section-header {
        padding: var(--spacing-sm) 0 var(--spacing-xs);
    }

    .section-header-title {
        font-size: clamp(1.75rem, 8vw, 2.5rem);
    }

    /* ====== PAGE HEADER ====== */
    .page-header .container {
        flex-direction: column;
        align-items: flex-start;
    }

    .page-title {
        font-size: clamp(1.75rem, 7vw, 2.5rem);
        text-align: left;
    }

    /* ====== GRIDS MOBILE ====== */
    .category-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    /* ====== WORK GRID (ACTING PAGE) ====== */
    .work-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .video-wrapper {
        border-radius: 6px;
    }

    .work-title {
        font-size: 1rem;
    }
}

/* ================================
   SMALL MOBILE BREAKPOINT (480px)
   ================================ */

@media (max-width: 480px) {
    html {
        font-size: 15px;
    }

    .hero-title {
        font-size: clamp(2rem, 12vw, 3rem);
    }

    .intro-text {
        font-size: 0.875rem;
    }

    .portfolio-card-title {
        font-size: clamp(1.375rem, 5.5vw, 1.75rem);
    }

    .portfolio-card-visual .portfolio-card-title {
        font-size: clamp(1.375rem, 5.5vw, 1.75rem);
    }

    .title-suffix {
        font-size: 0.625rem;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .glass-title,
    .portfolio-heading {
        font-size: 0.75rem;
    }

    .glass-back,
    .glass-action.contact-link {
        font-size: 0.75rem;
    }

}

/* ================================
   EXTRA SMALL MOBILE (375px and below)
   ================================ */

@media (max-width: 375px) {
    html {
        font-size: 14px;
    }

    :root {
        --spacing-xs: 0.5rem;
        --spacing-sm: 1rem;
        --spacing-md: 1.25rem;
        --spacing-lg: 1.5rem;
    }

    .hero-title {
        font-size: clamp(1.75rem, 13vw, 2.5rem);
    }

    .intro-text {
        font-size: 0.8125rem;
        line-height: 1.45;
    }

    .portfolio-card-title {
        font-size: clamp(1.25rem, 5vw, 1.5rem);
    }

    .portfolio-card-visual .portfolio-card-title {
        font-size: clamp(1.25rem, 5vw, 1.5rem);
    }

    .title-suffix {
        font-size: 0.5625rem;
        letter-spacing: 0.06em;
    }

    .glass-row {
        padding-left: max(0.5rem, env(safe-area-inset-left));
        padding-right: max(0.5rem, env(safe-area-inset-right));
    }

    .portfolio-grid {
        padding: 0 0 0.375rem;
        gap: 0.375rem;
    }

    .contact-link {
        padding: 0.75rem 1.25rem;
        font-size: 0.9375rem;
    }
}

/* ================================
   LANDSCAPE MOBILE
   ================================ */

@media (max-width: 896px) and (orientation: landscape) {
    .hero {
        height: 100vh;
        height: -webkit-fill-available;
        min-height: 100vh;
        min-height: 100svh;
        min-height: 100dvh;
        padding: var(--spacing-sm) 0;
    }

    .hero-minimal .container {
        padding-left: max(2rem, calc(env(safe-area-inset-left) + 1rem));
        padding-right: max(2rem, calc(env(safe-area-inset-right) + 1rem));
    }

    .hero-title {
        font-size: clamp(1.75rem, 6vw, 3rem);
    }

    .intro-text {
        font-size: 0.875rem;
    }

    .hero-intro {
        margin-bottom: var(--spacing-sm);
    }

    .glass-row {
        padding-left: max(1.5rem, calc(env(safe-area-inset-left) + 0.5rem));
        padding-right: max(1.5rem, calc(env(safe-area-inset-right) + 0.5rem));
    }

    .portfolio-selection {
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-y: contain;
        touch-action: pan-y;
    }

    .portfolio-selection .container {
        height: auto;
        min-height: 100%;
        /* Must clear fixed global header (44px tap targets + row padding) */
        padding-top: calc(56px + 0.5rem + env(safe-area-inset-top));
        padding-bottom: calc(0.65rem + env(safe-area-inset-bottom));
        padding-left: max(0.55rem, env(safe-area-inset-left));
        padding-right: max(0.55rem, env(safe-area-inset-right));
    }

    .portfolio-selection .glass-header .glass-row {
        padding-top: calc(0.45rem + env(safe-area-inset-top));
        padding-bottom: 0.45rem;
        padding-left: max(0.55rem, env(safe-area-inset-left));
        padding-right: max(0.55rem, env(safe-area-inset-right));
    }

    .glass-title,
    .portfolio-heading,
    .glass-action.contact-link {
        min-height: 36px;
    }

    .portfolio-grid {
        grid-template-rows: 1.2fr 1fr;
        gap: 0.4rem;
        padding-left: 0;
        padding-right: 0;
        height: auto;
        min-height: clamp(420px, 78dvh, 560px);
    }

    .portfolio-card,
    .portfolio-image-wrapper {
        border-radius: 5px;
    }

    .carousel-item,
    .carousel-image {
        border-radius: 5px;
    }

    .portfolio-card-content,
    .visual-content {
        padding: 0.5rem 0.625rem;
    }

    .portfolio-card-title,
    .portfolio-card-visual .portfolio-card-title {
        font-size: clamp(1.15rem, 3.2vw, 1.6rem);
        line-height: 0.92;
    }

    .title-suffix,
    .portfolio-card-visual .title-suffix {
        font-size: 0.62rem;
        letter-spacing: 0.05em;
        margin-top: 0.22rem;
        white-space: normal;
        line-height: 1.2;
    }

    .portfolio-card::after {
        bottom: 0.65rem;
        right: 0.6rem;
        width: 8px;
        height: 8px;
        border-right-width: 1.5px;
        border-top-width: 1.5px;
    }

    .visual-carousel {
        gap: 0;
    }
}

@media (max-width: 932px) and (max-height: 430px) and (orientation: landscape) {
    .portfolio-selection .container {
        padding-top: calc(52px + 0.35rem + env(safe-area-inset-top));
        padding-bottom: calc(0.35rem + env(safe-area-inset-bottom));
    }

    .portfolio-grid {
        grid-template-rows: 1.08fr 0.9fr;
        gap: 0.28rem;
        min-height: 360px;
    }

    .portfolio-card-content,
    .visual-content {
        padding: 0.45rem 0.55rem;
    }

    .title-suffix,
    .portfolio-card-visual .title-suffix {
        font-size: 0.56rem;
        letter-spacing: 0.05em;
        max-height: 1.25em;
        overflow: hidden;
    }
}

/* ================================
   iOS SAFARI SPECIFIC FIXES
   ================================ */

@supports (-webkit-touch-callout: none) {

    /* Fix 100vh on iOS Safari — height property is what Safari respects */
    .hero {
        height: 100vh;
        height: -webkit-fill-available;
        min-height: 100vh;
        min-height: 100svh;
        min-height: 100dvh;
    }

    .hero-minimal {
        height: 100vh;
        height: -webkit-fill-available;
        min-height: 100vh;
        min-height: 100svh;
        min-height: 100dvh;
    }

    /* Disable scroll snap on iOS - handled by custom swipe handler */
    html,
    body {
        scroll-snap-type: none !important;
    }

    .hero,
    .parallax-spacer,
    .portfolio-selection {
        scroll-snap-align: none !important;
        scroll-snap-stop: normal !important;
    }

    .parallax-spacer {
        height: 0 !important;
        display: none;
    }

    .portfolio-selection {
        position: fixed !important;
        overflow: hidden !important;
        height: 100dvh;
        min-height: 100dvh;
    }

    /* Improve touch scrolling */
    body {
        -webkit-overflow-scrolling: touch;
    }

    /* Fix sticky header on iOS */
    .glass-header {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }

    @media (max-width: 900px) {
        .internal-page .page-glass-header,
        body.is-subpage .global-header {
            position: fixed !important;
            top: 0;
            left: 0;
            right: 0;
            width: 100%;
            z-index: 110;
            -webkit-transform: none !important;
            transform: none !important;
            -webkit-backface-visibility: visible;
            backface-visibility: visible;
        }

        .internal-page .page-body {
            padding-top: calc(52px + env(safe-area-inset-top));
        }

        body.is-subpage .spa-content {
            padding-top: calc(52px + env(safe-area-inset-top));
        }

        .portfolio-selection {
            position: fixed !important;
            overflow: hidden !important;
            height: 100dvh;
            min-height: 100dvh;
        }

        @media (max-width: 896px) and (orientation: landscape) {
            .portfolio-selection {
                overflow-y: auto !important;
                -webkit-overflow-scrolling: touch;
            }
        }

        .visual-carousel-wrapper {
            position: absolute;
            top: 0;
            right: 0;
            bottom: 0;
            left: 0;
        }

        .visual-carousel {
            width: 100%;
            height: 100%;
            gap: 0;
            transform: translate3d(0, 0, 0);
            transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
        }

        .visual-carousel .carousel-item {
            width: 100%;
            height: 100%;
            padding: 0;
        }

    }

    @media (max-width: 896px) and (orientation: landscape) {
        .portfolio-selection {
            overflow-y: auto !important;
            -webkit-overflow-scrolling: touch;
        }
    }
}

/* ================================
   PERFORMANCE OPTIMIZATIONS
   ================================ */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .hero-title,
    .word-reveal {
        opacity: 1 !important;
        animation: none !important;
    }

    .scroll-indicator {
        display: none;
    }
}

/* GPU acceleration for smoother animations on mobile */
@media (max-width: 768px) {

    .portfolio-card,
    .portfolio-card-media,
    .carousel-item,
    .carousel-image {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
    }

    /* ====== INTERNAL PAGES MOBILE ====== */
    .internal-page {
        padding-bottom: env(safe-area-inset-bottom);
    }

    .internal-page .page-glass-header {
        position: sticky;
        top: 0;
        z-index: 100;
        -webkit-transform: none !important;
        transform: none !important;
        -webkit-backface-visibility: visible;
        backface-visibility: visible;
    }

    .internal-page .page-body,
    body.is-subpage .spa-content .page-body {
        animation: pageBodyEnterFade 0.46s cubic-bezier(0.22, 1, 0.36, 1);
        -webkit-transform: none !important;
        transform: none !important;
    }

    .internal-page .page-body.exit,
    body.is-subpage .spa-content .page-body.exit {
        animation: pageBodyExitFade 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    }

    .internal-page .section-header {
        padding: var(--spacing-md) var(--spacing-xs) var(--spacing-sm);
        padding-left: max(var(--spacing-xs), env(safe-area-inset-left));
        padding-right: max(var(--spacing-xs), env(safe-area-inset-right));
        position: sticky;
        top: calc(44px + env(safe-area-inset-top));
        z-index: 95;
        background: rgba(255, 255, 255, 0.92);
        backdrop-filter: blur(18px) saturate(160%);
        -webkit-backdrop-filter: blur(18px) saturate(160%);
        border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    }

    .internal-page .section-header-title {
        font-size: clamp(1.45rem, 6.8vw, 2.2rem);
        letter-spacing: -0.01em;
    }

    /* Categories mobile */
    .categories {
        padding: var(--spacing-sm) 0;
    }

    .category {
        margin-bottom: var(--spacing-sm);
    }

    .category-title {
        font-size: clamp(1.2rem, 4.8vw, 1.7rem);
        margin-bottom: 0.3rem;
    }

    .category-more {
        font-size: 0.62rem;
    }

    .category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.45rem;
    }

    .grid-item {
        -webkit-tap-highlight-color: transparent;
    }

    .item-image {
        border-radius: 6px;
        margin-bottom: 0.4rem;
    }

    .item-brand {
        font-size: 0.72rem;
        letter-spacing: 0.06em;
    }

    /* Gallery mobile */
    .gallery {
        padding: var(--spacing-md) 0;
        padding-bottom: calc(var(--spacing-md) + env(safe-area-inset-bottom));
    }

    .section-title {
        font-size: clamp(1.35rem, 5.5vw, 2rem);
        margin-bottom: 0.35rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .gallery-item {
        -webkit-tap-highlight-color: transparent;
    }

    .gallery-image {
        border-radius: 4px;
    }

    .gallery-brand {
        font-size: 0.69rem;
        letter-spacing: 0.06em;
    }

    .category-detail-section {
        padding: var(--spacing-xs) 0 var(--spacing-md);
    }

    .category-detail-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.55rem;
    }

    .category-detail-brand {
        font-size: 0.66rem;
    }

    .category-load-more {
        font-size: 0.64rem;
        padding: 0.48rem 0.9rem;
    }

    .category-lightbox-prev,
    .category-lightbox-next {
        width: 2.3rem;
        height: 2.3rem;
        font-size: 1.25rem;
    }

    .category-lightbox-close {
        width: 2.05rem;
        height: 2.05rem;
        font-size: 1.15rem;
    }

    .category-lightbox-caption {
        font-size: 0.7rem;
    }

    /* Acting page mobile */
    .acting-page .page-glass-header {
        position: sticky;
        top: 0;
    }

    .acting-header {
        padding: var(--spacing-md) 0 var(--spacing-sm);
    }

    .acting-work {
        padding: var(--spacing-sm) 0 var(--spacing-lg);
        padding-bottom: calc(var(--spacing-lg) + env(safe-area-inset-bottom));
    }

    .work-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .video-wrapper {
        border-radius: 6px;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    }

    .work-title {
        font-size: 0.9375rem;
        margin-top: 0.5rem;
    }

    /* Footer mobile */
    .footer {
        padding: var(--spacing-md) var(--spacing-xs);
        padding-bottom: calc(var(--spacing-md) + env(safe-area-inset-bottom));
    }

    .footer p {
        font-size: 0.8125rem;
    }
}
