:root {
    color-scheme: dark;
    --background: #050607;
    --surface: rgba(255, 255, 255, 0.055);
    --border: rgba(255, 255, 255, 0.14);
    --muted: #9ca3af;
    --white: #f7f7f7;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    min-height: 100vh;
    margin: 0;
    color: var(--white);
    background-color: #080808;
    background-image:
        radial-gradient(ellipse 82% 64% at 18% 10%, rgba(238, 238, 238, 0.11), transparent 72%),
        radial-gradient(ellipse 56% 66% at 90% 38%, rgba(190, 190, 190, 0.075), transparent 74%),
        radial-gradient(ellipse 60% 48% at 66% 102%, rgba(220, 220, 220, 0.085), transparent 72%),
        linear-gradient(116deg, #070707 0%, #111111 48%, #050505 100%),
        url("../assets/portfolio-glass-facets.svg"),
        radial-gradient(ellipse at center, transparent 28%, rgba(0, 0, 0, 0.58) 100%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' seed='9' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.34'/%3E%3C/svg%3E");
    background-size: auto, auto, auto, auto, cover, auto, 180px 180px;
    background-repeat: no-repeat, no-repeat, no-repeat, no-repeat, no-repeat, no-repeat, repeat;
    background-blend-mode: screen, screen, screen, normal, soft-light, multiply, soft-light;
    font-family: Inter, Arial, sans-serif;
}
a { color: inherit; text-decoration: none; }
.page-progress {
    position: fixed;
    inset: 0 0 auto;
    z-index: 100;
    height: 2px;
    pointer-events: none;
    background: rgba(255,255,255,.08);
}
.page-progress__bar {
    width: 100%;
    height: 100%;
    transform: scaleX(0);
    transform-origin: left center;
    background: linear-gradient(90deg,#727985,#f1f3f6 48%,#9da7b5);
    box-shadow: 0 0 12px rgba(225,232,240,.38);
    will-change: transform;
}
.motion-reveal {
    opacity: 0;
    filter: blur(4px);
    transform: translateY(28px) scale(.99);
    transition: opacity 850ms cubic-bezier(.16,1,.3,1), filter 850ms cubic-bezier(.16,1,.3,1), transform 850ms cubic-bezier(.16,1,.3,1);
    transition-delay: var(--motion-delay,0ms);
}
.motion-reveal.is-revealed { opacity: 1; filter: blur(0); transform: translateY(0) scale(1); }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .motion-reveal { opacity: 1; filter: none; transform: none; transition-duration: 1ms; }
}
.topbar {
    width: min(1180px, calc(100% - 40px));
    margin: 18px auto 0;
    padding: 15px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(12, 14, 18, 0.68);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 12px 32px rgba(0, 0, 0, 0.24);
}
.brand { font-size: 1.25rem; font-weight: 900; letter-spacing: -0.06em; }
.back-link {
    padding: 10px 16px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: #e5e7eb;
    transition: background 700ms ease, transform 700ms ease;
}
.back-link:hover { background: rgba(255,255,255,.1); transform: translateY(-2px); }
main { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.page-hero { padding: clamp(100px, 17vh, 180px) 0 68px; }
.eyebrow { margin: 0 0 18px; color: #a1a1aa; font-size: .72rem; font-weight: 700; letter-spacing: .24em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(3.5rem, 9vw, 7rem); line-height: .95; letter-spacing: -.075em; }
.description { max-width: 620px; margin: 26px 0 0; color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.3rem); line-height: 1.7; font-weight: 300; }
.gallery { padding-bottom: 100px; }
.empty-state {
    position: relative;
    overflow: hidden;
    min-height: 330px;
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: 1px solid rgba(238,240,244,.24);
    border-radius: 28px;
    background: linear-gradient(145deg, rgba(255,255,255,.12), rgba(255,255,255,.035) 48%, rgba(255,255,255,.045)), rgba(16,16,18,.42);
    -webkit-backdrop-filter: blur(28px) saturate(145%);
    backdrop-filter: blur(28px) saturate(145%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 24px 60px rgba(0,0,0,.34);
    transition: transform 900ms cubic-bezier(.2,.8,.2,1), border-color 900ms ease, box-shadow 900ms ease;
}
.empty-mark { margin-bottom: 24px; color: #71717a; font-size: .7rem; font-weight: 700; letter-spacing: .24em; }
.empty-state::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(112deg, transparent 20%, rgba(255,255,255,.16) 48%, transparent 62%);
    transform: translateX(-115%) skewX(-18deg);
    transition: transform 1400ms cubic-bezier(.2,.8,.2,1);
    pointer-events: none;
}
.empty-state > * { position: relative; z-index: 1; }
.empty-state:hover {
    transform: translateY(-5px);
    border-color: rgba(235,240,245,.42);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 26px 62px rgba(0,0,0,.4), 0 0 24px rgba(220,230,240,.08);
}
.empty-state:hover::before { transform: translateX(115%) skewX(-18deg); }
.empty-state h2 { margin: 0; font-size: clamp(1.5rem, 4vw, 2.2rem); letter-spacing: -.04em; }
.empty-state p { max-width: 460px; margin: 14px 0 0; color: var(--muted); line-height: 1.7; font-weight: 300; }
footer {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 26px 0 36px;
    border-top: 1px solid rgba(255,255,255,.1);
    color: #71717a;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
}
@media (max-width: 600px) {
    .topbar { width: calc(100% - 24px); margin-top: 12px; padding: 12px 15px; }
    main, footer { width: calc(100% - 32px); }
    .page-hero { padding-top: 110px; }
    .empty-state { min-height: 270px; padding: 28px 20px; }
}
.gallery-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 22px;
    align-items: start;
}
.gallery-grid--shorts > .video-card,
.gallery-grid--photos > .photo-card {
    flex: 1 1 230px;
    max-width: 280px;
}
.gallery-grid--landscape > .video-card {
    flex: 1 1 340px;
    max-width: 580px;
}
@media (max-width: 520px) {
    .gallery-grid--shorts > .video-card,
    .gallery-grid--photos > .photo-card,
    .gallery-grid--landscape > .video-card {
        flex-basis: 100%;
        max-width: none;
    }
}.media-card {
    overflow: hidden;
    border: 1px solid rgba(238, 240, 244, .16);
    border-radius: 26px;
    background: linear-gradient(145deg, rgba(255,255,255,.105), rgba(255,255,255,.025) 55%, rgba(255,255,255,.045)), rgba(12,14,18,.55);
    -webkit-backdrop-filter: blur(22px) saturate(135%);
    backdrop-filter: blur(22px) saturate(135%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 22px 52px rgba(0,0,0,.34), 0 8px 18px rgba(0,0,0,.22);
    transition: transform 800ms cubic-bezier(.2,.8,.2,1), border-color 800ms ease, box-shadow 800ms ease;
}
.media-card:hover {
    transform: translateY(-5px);
    border-color: rgba(235,240,245,.34);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 28px 60px rgba(0,0,0,.42), 0 0 24px rgba(220,230,240,.07);
}
.media-frame {
    position: relative;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #050607;
}
.media-frame--short { aspect-ratio: 9 / 16; }
.media-embed { display: block; width: 100%; height: 100%; border: 0; }
.media-caption { min-height: 66px; padding: 18px 20px; }
.media-caption p {
    margin: 0;
    color: #a1a1aa;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
}
.media-caption .media-kicker { margin-bottom: 8px; color: #71717a; font-size: .62rem; }
.media-caption h2 { margin: 0; font-size: 1rem; font-weight: 600; letter-spacing: -.02em; }
.photo-frame {
    display: block;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: rgba(0,0,0,.38);
}
.photo-frame img {
    display: block;
    width: 100%;
    height: 100%;
    padding: 12px;
    object-fit: contain;
    transition: transform 900ms cubic-bezier(.2,.8,.2,1);
}
.photo-frame:hover img { transform: scale(1.025); }
.youtube-preview {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: #050607;
}
.youtube-preview img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: .72;
    transition: transform 800ms ease, opacity 800ms ease;
}
.youtube-preview:hover img { transform: scale(1.035); opacity: .88; }
.youtube-preview__badge {
    position: relative;
    z-index: 1;
    padding: 11px 16px;
    border: 1px solid rgba(255,255,255,.32);
    border-radius: 999px;
    color: #fff;
    background: rgba(10,12,15,.72);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .08em;
}
@media (prefers-reduced-motion: reduce) {
    .media-card, .photo-frame img, .youtube-preview img { transition-duration: 1ms; }
}
/* Keep single Shorts frames at the same desktop width as gallery cards. */
.gallery-grid--shorts > .video-card:only-child {
    width: min(100%, 280px);
    justify-self: start;
}
@media (max-width: 520px) {
    .gallery-grid--shorts > .video-card:only-child { width: 100%; }
}

/* Center embedded players and previews inside every video frame. */
.media-frame {
    display: grid;
    place-items: center;
}
.media-embed {
    justify-self: center;
    align-self: center;
    object-position: center center;
}
.youtube-preview { align-items: center; justify-items: center; }
.youtube-preview img { object-position: center center; }
/* Keep incomplete rows balanced while preserving equal card widths. */
.gallery-grid--balanced {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 22px;
}
.gallery-grid--balanced > .video-card {
    flex: 1 1 230px;
    max-width: 280px;
}
@media (max-width: 520px) {
    .gallery-grid--balanced > .video-card {
        flex-basis: 100%;
        max-width: none;
    }
}
/* Fast YouTube previews: fetch only a thumbnail until the viewer chooses to play. */
.youtube-preview {
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    color: var(--white, #f7f7f7);
    font: inherit;
    text-align: left;
    cursor: pointer;
}
.youtube-preview::after {
    content: "";
    position: absolute;
    z-index: 1;
    inset: 35% 0 0;
    background: linear-gradient(180deg, transparent, rgba(0,0,0,.58));
    pointer-events: none;
}
.youtube-preview img { z-index: 0; }
.youtube-preview__play {
    position: relative;
    z-index: 2;
    width: 68px;
    height: 68px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255,255,255,.48);
    border-radius: 50%;
    color: #fff;
    background: rgba(10,12,15,.74);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.24), 0 8px 24px rgba(0,0,0,.35);
    transition: transform 260ms ease, background 260ms ease, box-shadow 260ms ease;
}
.youtube-preview__play svg { width: 24px; height: 24px; margin-left: 3px; }
.youtube-preview:hover .youtube-preview__play {
    transform: scale(1.07);
    background: rgba(20,22,26,.9);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.34), 0 12px 28px rgba(0,0,0,.42);
}
.youtube-preview__badge {
    position: absolute;
    z-index: 2;
    left: 16px;
    bottom: 16px;
    padding: 7px 10px;
    font-size: .62rem;
    letter-spacing: .14em;
}
.youtube-preview:focus-visible {
    outline: 2px solid #fff;
    outline-offset: -5px;
}
