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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #f6f5f1;
    color: #1a1a1a;
    overflow: hidden;
    height: 100vh;
    height: 100dvh;
    width: 100vw;
}

body.scrollable {
    overflow-y: auto;
    height: auto;
}

/* ── Gate ── */

#gate {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f6f5f1;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

#gate.leaving {
    opacity: 0;
    transform: scale(1.02);
    pointer-events: none;
}

#particleCanvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.gate-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    position: relative;
    z-index: 1;
}

.gate-box {
    background: #fff;
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 12px;
    padding: 32px 40px;
    min-width: 340px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    box-shadow:
        0 1px 2px rgba(0,0,0,0.03),
        0 4px 16px rgba(0,0,0,0.03),
        0 16px 56px rgba(0,0,0,0.06);
}

.checkbox-area {
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    background: none;
    border: none;
    color: #1a1a1a;
    font-family: inherit;
    font-size: 15px;
    font-weight: 400;
    padding: 8px 4px;
    letter-spacing: -0.01em;
}

.checkbox-area:hover .checkbox { border-color: #888; }

.checkbox {
    width: 28px;
    height: 28px;
    border: 2px solid #ccc;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.checkbox.checked { background: #22c55e; border-color: #22c55e; }

.checkmark-icon {
    width: 16px;
    height: 16px;
    stroke: #fff;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.3s ease;
}

.checkbox.checked .checkmark-icon { opacity: 1; transform: scale(1); }

.challenge {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    width: 100%;
    animation: fadeSlideIn 0.3s ease;
}

.challenge.visible { display: flex; }

@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.instruction { font-size: 14px; font-weight: 500; color: #888; letter-spacing: 0.02em; text-transform: uppercase; }
.instruction span#targetNumber { color: #1a1a1a; font-size: 20px; font-weight: 600; }

.webcam-wrapper { position: relative; width: 280px; height: 210px; border-radius: 8px; overflow: hidden; background: #f0eeea; }
#webcam { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
#overlay { position: absolute; inset: 0; width: 100%; height: 100%; transform: scaleX(-1); pointer-events: none; }

.status-pill {
    position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%);
    background: rgba(255,255,255,0.9); backdrop-filter: blur(8px);
    padding: 5px 14px; border-radius: 20px; font-size: 12px; font-weight: 500; color: #666;
    transition: all 0.3s ease; white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.status-pill.correct { color: #16a34a; background: rgba(34,197,94,0.15); }
.status-pill.wrong { color: #ea580c; background: rgba(249,115,22,0.12); }

.progress-track { width: 100%; height: 4px; background: #e5e3df; border-radius: 2px; overflow: hidden; }
.progress-fill { height: 100%; width: 0%; background: #22c55e; border-radius: 2px; transition: width 0.1s linear; }

.skip-link { background: none; border: none; color: #aaa; font-family: inherit; font-size: 12px; cursor: pointer; padding: 4px 8px; transition: color 0.2s; }
.skip-link:hover { color: #777; }

/* ── Card Overlay ── */

#cardOverlay {
    position: fixed;
    inset: 0;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(ellipse at 50% 45%, rgba(255,255,255,0.5) 0%, transparent 60%),
        radial-gradient(ellipse at 50% 55%, #f6f5f1 0%, #ebe9e4 100%);
    opacity: 0;
    pointer-events: none;
    will-change: opacity;
}

#cardOverlay::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.035;
    pointer-events: none;
    mix-blend-mode: multiply;
}

#cardOverlay.visible {
    opacity: 1;
    pointer-events: auto;
}

/* ── Business Card (7:4 = standard 3.5×2 ratio) ── */

.card {
    width: 920px;
    max-width: calc(100vw - 48px);
    background: #fff;
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,0.06);
    box-shadow:
        0 1px 2px rgba(0,0,0,0.03),
        0 4px 16px rgba(0,0,0,0.03),
        0 16px 56px rgba(0,0,0,0.06);
    padding: 52px 60px;
    display: flex;
    flex-direction: column;
    gap: 40px;
    position: relative;
    transform-style: preserve-3d;
    will-change: transform, opacity;
    opacity: 0;
    transform: translateY(28px) scale(0.97);
    cursor: default;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: #1a1a1a;
}

.card.visible {
    opacity: 1;
    transform: translateY(0) scale(1) perspective(800px) rotateX(0) rotateY(0);
    transition:
        opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.2s,
        transform 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.2s;
}

.card.interactive {
    transition: transform 0.12s ease-out, box-shadow 0.3s ease;
}

.card.interactive:hover {
    box-shadow:
        0 1px 2px rgba(0,0,0,0.03),
        0 8px 24px rgba(0,0,0,0.05),
        0 24px 64px rgba(0,0,0,0.08);
}

.card-top { display: flex; align-items: center; gap: 48px; }

.card-photo {
    width: 220px; height: 270px; border-radius: 6px; background: #f0eeea;
    flex-shrink: 0; display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.card-photo img { width: 100%; height: 100%; object-fit: cover; }
.card-photo-icon { width: 32px; height: 32px; color: #c5c0b8; }

.card-info { display: flex; flex-direction: column; justify-content: center; min-width: 0; flex: 1; }

.card-name {
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: clamp(40px, 5.5vw, 52px);
    font-weight: 400; color: #1a1a1a;
    letter-spacing: -0.03em; line-height: 1.1; margin-bottom: 4px;
}

.card-tagline { font-size: 13.5px; color: #777; line-height: 1.7; }
.card-tagline:first-of-type { margin-top: 14px; }
.card-tagline + .card-tagline { margin-top: 10px; }

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

.card-links { display: flex; align-items: center; gap: 10px; }
.card-links .contact-link { font-size: 12.5px; color: #777; text-decoration: none; transition: color 0.2s; }
.card-links .contact-link:hover { color: #1a1a1a; }
.card-links-sep { color: #ccc; font-size: 12px; user-select: none; }

.card-socials { display: flex; gap: 14px; }

.contact-link { color: #1a1a1a; text-decoration: none; font-size: 13px; transition: color 0.2s; }
.contact-link:hover { color: #666; }
.contact-icon { display: flex; align-items: center; line-height: 0; }
.card-socials .contact-icon { color: #aaa; }
.card-socials .contact-icon:hover { color: #1a1a1a; }

/* ── Scroll Cue ── */

.scroll-cue {
    position: absolute;
    bottom: max(28px, 5vh); left: 50%; transform: translateX(-50%);
    display: flex; align-items: center; justify-content: center;
    color: #888;
    animation: scrollBounce 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    opacity: 0;
    transition: opacity 0.5s ease 1.4s;
}

.scroll-cue svg {
    width: 20px;
    height: 20px;
}

#cardOverlay.visible .scroll-cue { opacity: 1; }

@keyframes scrollBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(6px); }
}

/* ── Header (96px) ── */

#header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 96px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 48px;
    background: rgba(250, 249, 247, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 50;
    opacity: 0;
    pointer-events: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    will-change: opacity, transform;
}

#header.visible {
    opacity: 1;
    pointer-events: auto;
    transition: opacity 0.15s ease-out;
}

.header-name {
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: 33px; color: #1a1a1a; letter-spacing: -0.02em;
}

.header-contact { display: flex; align-items: center; gap: 30px; }
.header-contact .contact-link { font-size: 15px; color: #777; }
.header-contact .contact-link:hover { color: #1a1a1a; }

/* ── Morph Layer ── */

.morph-layer {
    position: fixed;
    inset: 0;
    z-index: 200;
    pointer-events: none;
}

.morph-shell {
    position: fixed;
    overflow: hidden;
    will-change: left, top, width, height, border-radius;
}

.morph-layer {
    transition: opacity 0.15s ease-out;
}

.morph-shell-accent {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: #1a1a1a;
}

.morph-ghost {
    position: fixed;
    margin: 0; padding: 0;
    white-space: nowrap;
    text-decoration: none;
    display: flex;
    align-items: center;
    transform-origin: 0 0;
    pointer-events: none;
    will-change: left, top, transform;
}

.morph-fade {
    position: fixed;
    margin: 0;
    pointer-events: none;
    will-change: opacity;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.morph-fade img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ── Content ── */

#content {
    max-width: 800px;
    margin: 0 auto;
    padding: 148px 24px 0;
    opacity: 0;
    visibility: hidden;
}

#content.visible {
    opacity: 1;
    visibility: visible;
}

/* ── About ── */

#about {
    margin-bottom: 80px;
    padding-bottom: 48px;
    border-bottom: 1px solid rgba(0,0,0,0.08);
}
.about-text { font-size: 19px; line-height: 1.8; color: #444; margin-bottom: 24px; }
.about-text:last-child { margin-bottom: 0; }

/* ── Work Section ── */

#work {
    width: 100vw;
    max-width: 900px;
    margin-left: 50%;
    transform: translateX(-50%);
    margin-bottom: 80px;
    padding: 0 24px;
}

.work-intro {
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: 32px;
    color: #1a1a1a;
    text-align: center;
    margin-bottom: 48px;
    font-style: normal;
    letter-spacing: -0.02em;
}

.work-category {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #999;
    margin-top: 48px;
    margin-bottom: 12px;
    padding-left: 4px;
}

.work-category:first-child {
    margin-top: 0;
}

.work-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.work-item {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #fff;
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 8px;
    padding: 14px 18px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
    color: inherit;
    animation: fadeIn 0.5s ease calc(var(--delay)) both;
}

.work-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.work-thumb {
    width: 100px;
    height: 68px;
    border-radius: 4px;
    background: #fff;
    flex-shrink: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.work-thumb img {
    width: 85%;
    height: 85%;
    object-fit: contain;
}

.work-thumb-icon {
    color: #c5c0b8;
    width: 20px;
    height: 20px;
}

.work-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    flex: 1;
}

.work-title {
    font-size: 15px;
    font-weight: 500;
    color: #1a1a1a;
    line-height: 1.3;
}

.work-desc {
    font-size: 13px;
    color: #777;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.work-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 2px;
}

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

.work-badge {
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #999;
    background: rgba(0,0,0,0.04);
    padding: 2px 8px;
    border-radius: 4px;
}

.work-link-icon {
    margin-left: auto;
    flex-shrink: 0;
    color: #ccc;
    transition: color 0.2s;
    display: flex;
    align-items: center;
}

.work-item:hover .work-link-icon {
    color: #888;
}

/* ── Media Section ── */

#media {
    width: 100vw;
    max-width: 1200px;
    margin-left: 50%;
    transform: translateX(-50%);
    margin-bottom: 64px;
    padding: 0 24px;
}

.media-intro {
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: 32px;
    color: #1a1a1a;
    text-align: center;
    margin-bottom: 48px;
    font-style: normal;
    letter-spacing: -0.02em;
}

.media-wall {
    column-count: 5;
    column-gap: 16px;
    max-width: 900px;
    margin: 0 auto;
}

/* ── Media Item Base ── */

.media-item {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    animation: fadeIn 0.6s ease calc(var(--delay)) both;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    break-inside: avoid;
    margin-bottom: 16px;
    display: block;
    text-decoration: none;
    color: inherit;
}

.media-item:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 32px rgba(0,0,0,0.15);
    z-index: 10;
}

.media-cover {
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1), 0 4px 16px rgba(0,0,0,0.08);
    border-radius: 4px;
}

.media-cover img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform 0.4s ease;
}

.media-item:hover .media-cover img {
    transform: scale(1.03);
}

.media-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 32px 12px 12px;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.media-item:hover .media-info {
    opacity: 1;
}

.media-title {
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    line-height: 1.3;
}

.media-subtitle {
    font-size: 10px;
    color: rgba(255,255,255,0.7);
}






/* ── Work Modal ── */

.work-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
}

.work-modal.open {
    display: flex;
}

.work-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.work-modal-container {
    position: relative;
    z-index: 1;
    max-width: 680px;
    width: calc(100% - 48px);
    display: flex;
    align-items: center;
    gap: 16px;
}

.work-modal-content {
    background: #fff;
    border-radius: 12px;
    padding: 44px 48px;
    flex: 1;
    overflow-y: auto;
    max-height: 85vh;
    box-shadow:
        0 1px 2px rgba(0,0,0,0.03),
        0 4px 16px rgba(0,0,0,0.06),
        0 24px 64px rgba(0,0,0,0.1);
    animation: modalIn 0.25s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.96) translateY(8px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.work-modal-arrow {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.08);
    background: #fff;
    color: #555;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: transform 0.2s, box-shadow 0.2s;
}

.work-modal-arrow:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Detail content styles */

.work-detail-category {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #999;
    margin-bottom: 8px;
}

.work-detail-title {
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: 24px;
    font-weight: 400;
    color: #1a1a1a;
    line-height: 1.3;
    margin-bottom: 16px;
}

.work-detail-desc {
    margin-bottom: 16px;
}

.work-detail-desc p {
    font-size: 15px;
    color: #555;
    line-height: 1.7;
    margin-bottom: 10px;
}

.work-detail-desc p:last-child {
    margin-bottom: 0;
}

.work-detail-figure {
    margin-bottom: 16px;
}

.work-detail-image {
    max-width: 100%;
    border-radius: 6px;
}

.work-detail-caption {
    font-size: 12px;
    color: #999;
    margin-top: 6px;
    font-style: italic;
}

.work-detail-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.work-detail-date {
    font-size: 12px;
    color: #aaa;
}

.work-detail-badge {
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #999;
    background: rgba(0,0,0,0.04);
    padding: 2px 8px;
    border-radius: 4px;
}

.work-detail-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #555;
    text-decoration: none;
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 6px;
    padding: 8px 16px;
    transition: background 0.2s, color 0.2s;
    margin-bottom: 12px;
}

.work-detail-link:hover {
    background: rgba(0,0,0,0.04);
    color: #1a1a1a;
}

/* Split layout for PDF items */

.work-detail-split {
    display: flex;
    gap: 32px;
    align-items: stretch;
}

.work-detail-split-text {
    flex: 1;
    min-width: 0;
}

.work-detail-split-embed {
    flex: 0 0 380px;
}

.work-detail-split-embed .work-detail-embed {
    margin-bottom: 0;
    height: 100%;
}

.work-detail-split-embed .work-detail-embed-pdf {
    height: 100%;
    min-height: 500px;
}

.work-detail-split-embed .work-detail-embed-pdf iframe {
    height: 100%;
    border-radius: 8px;
}

.work-modal.wide .work-modal-container {
    max-width: 1020px;
}

.work-detail-embed {
    margin-bottom: 16px;
    border-radius: 8px;
    overflow: hidden;
    background: #f0eeea;
}

.work-detail-embed iframe {
    display: block;
    width: 100%;
    border: none;
}

.work-detail-embed-video {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
}

.work-detail-embed-video iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.work-detail-embed-pdf {
    position: relative;
}

.work-detail-embed-pdf iframe {
    height: 400px;
}

.embed-open-link {
    position: absolute;
    bottom: 10px;
    right: 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    color: #555;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    transition: background 0.2s, color 0.2s, transform 0.2s;
    z-index: 2;
}

.embed-open-link:hover {
    background: #fff;
    color: #1a1a1a;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.14);
}

.work-modal-close {
    display: none;
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.08);
    background: #fff;
    color: #555;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.work-modal-mobile-nav {
    display: none;
    gap: 12px;
    justify-content: center;
    margin-top: 12px;
}

/* ── Media Showcase ── */

.work-detail-showcase {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: stretch;
    gap: 12px;
    margin-bottom: 20px;
}

.showcase-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.showcase-video-short {
    grid-row: 1 / -1;
}

.showcase-multi-short {
    grid-template-columns: auto auto;
    justify-content: center;
}

.showcase-multi-short .showcase-video-short {
    grid-row: auto;
}

.showcase-multi-short .showcase-video-landscape {
    grid-column: 1 / -1;
}

.showcase-video-wrapper {
    position: relative;
    width: 242px;
    aspect-ratio: 9 / 16;
    border-radius: 10px;
    overflow: hidden;
    background: #1a1a1a;
}

.showcase-video-wrapper iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.showcase-image-landscape {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-self: stretch;
}

.showcase-image-wrapper {
    flex: 1;
    border-radius: 8px;
    overflow: hidden;
    background: #eae8e4;
    display: flex;
    align-items: center;
    justify-content: center;
}

.showcase-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.showcase-image-wrapper.showcase-placeholder {
    position: relative;
    min-height: 140px;
}

.showcase-image-wrapper.showcase-placeholder::after {
    content: 'Image coming soon';
    font-size: 12px;
    color: #aaa;
    font-style: italic;
}

.showcase-image-wrapper.showcase-placeholder img {
    display: none;
}

.showcase-video-landscape {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.showcase-video-landscape-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    overflow: hidden;
    background: #1a1a1a;
}

.showcase-video-landscape-wrapper iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.showcase-equal {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
}

.showcase-equal:has(.showcase-item:only-child) {
    grid-template-columns: 1fr;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

.showcase-tiktok-wrapper {
    background: #000;
}

.showcase-caption {
    font-size: 11px;
    color: #999;
    line-height: 1.4;
    font-style: italic;
    text-align: center;
    text-wrap: balance;
}

/* ── TikTok Embed ── */

.work-detail-embed-tiktok {
    position: relative;
    max-width: 340px;
    aspect-ratio: 9 / 16;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
    margin: 0 auto 16px;
}

.work-detail-embed-tiktok iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}

@media (max-width: 640px) {
    .work-detail-showcase {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .showcase-video-short {
        grid-row: auto;
    }

    .showcase-video-wrapper {
        width: 100%;
        max-width: 280px;
        margin: 0 auto;
    }

    .showcase-image-wrapper.showcase-placeholder {
        min-height: 120px;
    }

    .showcase-equal {
        grid-template-columns: 1fr;
    }
}

/* ── Animation ── */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ── Sign-off ── */

#signoff { text-align: center; padding: 48px 24px 80px; }
.last-updated {
    font-size: 12px;
    color: #aaa;
}

/* ── Mobile ── */

@media (max-width: 900px) {
    .media-wall {
        column-count: 4;
    }
}

@media (max-width: 640px) {
    /* Card as inline content on mobile */
    #cardOverlay.mobile-inline {
        position: static;
        z-index: auto;
        background: none;
        padding: 120px 16px 32px;
    }

    #cardOverlay.mobile-inline::before {
        display: none;
    }

    .card {
        aspect-ratio: auto; padding: 32px 28px; gap: 28px;
        width: 100%;
        max-width: 100%;
        will-change: auto;
        transform-style: flat;
    }
    .card-top { flex-direction: column; align-items: center; text-align: center; gap: 20px; }
    .card-photo { width: 130px; height: 130px; border-radius: 50%; }
    .card-info { align-items: center; padding-top: 0; }
    .card-tagline { text-align: center; }
    .card-bottom { flex-direction: column; align-items: center; gap: 12px; }
    .card-links { flex-direction: column; align-items: center; gap: 4px; }
    .card-links-sep { display: none; }
    .card-socials { justify-content: center; }
    .header-email, .header-phone { display: none; }
    #header { padding: 0 24px; }

    /* Reduce top padding on content since card is above it */
    #content { padding-top: 24px; }

    .media-wall {
        column-count: 2;
        column-gap: 12px;
    }

    .media-item {
        margin-bottom: 12px;
    }

    .media-intro {
        font-size: 26px;
        margin-bottom: 32px;
    }

    #media {
        padding: 0 16px;
    }

    #work {
        padding: 0 16px;
    }

    .work-item {
        padding: 12px 14px;
        gap: 12px;
    }

    .work-thumb {
        width: 72px;
        height: 50px;
    }

    .work-title {
        font-size: 14px;
    }

    .work-desc {
        font-size: 12px;
    }

    .work-intro {
        font-size: 26px;
        margin-bottom: 32px;
    }

    /* Modal mobile */
    .work-detail-split {
        flex-direction: column;
    }

    .work-detail-split-embed {
        flex: none;
    }

    .work-modal.wide .work-modal-container {
        max-width: calc(100% - 32px);
    }

    .work-modal-container {
        flex-direction: column;
        width: calc(100% - 32px);
        max-height: 90vh;
    }

    .work-modal-content {
        padding: 24px;
        max-height: 70vh;
    }

    .work-detail-title {
        font-size: 20px;
    }

    .work-modal-arrow {
        position: static;
    }

    .work-modal-container > .work-modal-prev,
    .work-modal-container > .work-modal-next {
        display: none;
    }

    .work-modal-mobile-nav {
        display: flex;
    }

    .work-modal-close {
        display: flex;
    }

    /* Show media info on mobile since hover doesn't work on touch */
    .media-info {
        opacity: 1;
    }
}
