/* ---------------- FONT ---------------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Reenie+Beanie&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Funnel+Sans:wght@300;400;500;600;700&display=swap');

body {
    font-family: 'Funnel Sans', sans-serif;
    margin: 0;
    background: #000;
    color: #f5f5f7;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    z-index: 3;
}

/* ---------------- HEADINGS ---------------- */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.022em;
    line-height: 1.1;
}

/* ---------------- HEADER ---------------- */
header {
    position: relative;
    text-align: center;
    padding: 80px 20px 50px;
    z-index: 3;
}

header h1 {
    position: relative;
    z-index: 3;
    font-size: clamp(36px, 5vw, 64px);
    font-weight: 700;
    letter-spacing: -0.03em;
    color: #f5f5f7;
}

header p {
    font-size: 17px;
    color: #a1a1a6;
    z-index: 3;
}

.header-subtitle {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
}

.role-tag {
    opacity: 0;
    transform: translateY(8px);
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.01em;
    color: #a1a1a6;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 980px;
    padding: 5px 14px;
    animation: roleAppear 0.5s ease forwards;
}

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

/* ---------------- NAVIGATION ---------------- */
nav {
    display: flex;
    justify-content: center;
    gap: 20px;
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

nav.nav-stuck {
    background: rgba(0, 0, 0, 0.55);
    box-shadow: 0 2px 28px rgba(0, 0, 0, 0.7);
}

nav a {
    color: #f5f5f7;
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.01em;
    transition: color 0.2s ease;
    z-index: 3;
}

nav a:hover {
    color: #a1a1a6;
    z-index: 3;
}

/* ---------------- JETPACK VIDEO ---------------- */
#jetpack-video,
#skijump-video,
#surfing-video {
    position: absolute;
    pointer-events: none;
    opacity: 0;
    z-index: 0;
    transition: opacity 0.7s ease;
    height: clamp(62px, calc(5vw * 1.72), 110px);
    width: auto;
    mix-blend-mode: screen;
    -webkit-mask-image: radial-gradient(ellipse 55% 55% at 50% 50%, black 20%, transparent 80%);
    mask-image: radial-gradient(ellipse 55% 55% at 50% 50%, black 20%, transparent 80%);
}
#surfing-video {
    filter: contrast(1.4) brightness(1.2);
    -webkit-mask-image: radial-gradient(ellipse 70% 65% at 50% 50%, black 25%, transparent 85%);
    mask-image: radial-gradient(ellipse 70% 65% at 50% 50%, black 25%, transparent 85%);
}
@media (max-width: 767px) {
    #jetpack-video  { display: none; }
    #skijump-video  { display: none; }
    #surfing-video  { display: none; }
}

/* ---------------- STICKMAN ANIMATION ---------------- */
#falling-a {
    display: inline-block;
}

/*
 * Fall uses transform-origin: 0 0 (top-left corner = the first screw that stays put).
 * Swing phase 0-61%: pendulum rotation with rising amplitude.
 * Fall phase 61-100%: translate(0, Y) rotate(28deg) — proven straight-down:
 *   the element centre moves only in Y (constant X = 1.79px offset from original).
 */
.letter-fallen {
    transform-origin: 0 0;
    animation: a-fall 1.3s linear forwards;
}
.letter-risen {
    transform-origin: 0 0;
    animation: a-rise 0.55s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
@keyframes a-fall {
    /*
     * ONE slow gravity swing — letter pivots around the remaining top-left screw.
     * Starts barely moving (gravity takes hold), arcs to ~35°, brief strain-return,
     * second screw snaps, falls straight down at ~27° tilt.
     */
    0%   { transform: rotate(0deg); }
    8%   { transform: rotate(4deg); }   /* very slow start — gravity pulling */
    40%  { transform: rotate(35deg); }  /* peak of single swing */
    53%  { transform: rotate(23deg); }  /* brief back-strain on last screw */
    85%  { transform: rotate(27deg); }  /* screw snaps */
    100% { transform: translate(0, var(--fall-y, 70px)) rotate(27deg); }
}
@keyframes a-rise {
    from { transform: translate(0, var(--fall-y, 70px)) rotate(27deg); }
    to   { transform: translate(0, 0) rotate(0deg); }
}

/* --- Stickman wrapper --- */
#stickman-wrap {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    z-index: 10;
}
#stickman-svg {
    width: clamp(38px, calc(5vw * 1.0625), 68px);
    height: auto;
}
#stickman-wrap.running-in {
    opacity: 1;
    animation: sm-run-in 0.9s ease-out forwards;
}
#stickman-wrap.bending-down,
#stickman-wrap.standing-up,
#stickman-wrap.fixing {
    opacity: 1;
    transform: translateX(0);
}
#stickman-wrap.running-out {
    opacity: 1;
    animation: sm-run-out 0.7s ease-in forwards;
}
@keyframes sm-run-in {
    from { transform: translateX(var(--sm-offscreen, 500px)); }
    to   { transform: translateX(0); }
}
@keyframes sm-run-out {
    from { transform: translateX(0); }
    to   { transform: translateX(var(--sm-offscreen, 500px)); }
}

/*
 * Body bob + lean: lean LEFT (negative angle) when running left (running-in),
 * lean RIGHT (positive) when running right (running-out).
 * This gives the side-view running silhouette.
 */
#stickman-wrap.running-in #stickman-svg {
    animation: sm-bob-in 0.16s ease-in-out infinite alternate;
}
#stickman-wrap.running-out #stickman-svg {
    animation: sm-bob-out 0.16s ease-in-out infinite alternate;
}
@keyframes sm-bob-in {
    from { transform: translateY(0px)  rotate(-15deg); }
    to   { transform: translateY(-3px) rotate(-17deg); }
}
@keyframes sm-bob-out {
    from { transform: translateY(0px)  rotate(15deg); }
    to   { transform: translateY(-3px) rotate(17deg); }
}

/* Bend at hips: only the upper body rotates forward, legs stay put */
#stickman-wrap.bending-down #sm-upper {
    animation: sm-upper-bend 0.4s ease-in-out forwards;
}
@keyframes sm-upper-bend {
    0%   { transform: rotate(0deg); }
    65%  { transform: rotate(58deg); }
    100% { transform: rotate(52deg); }
}

/* Straighten back up while letter rises */
#stickman-wrap.standing-up #sm-upper {
    animation: sm-upper-stand 0.45s ease-out forwards;
}
@keyframes sm-upper-stand {
    from { transform: rotate(52deg); }
    to   { transform: rotate(0deg); }
}

/* Subtle working sway during the 3-second fix — stops it looking frozen */
#stickman-wrap.fixing #stickman-svg {
    animation: sm-fix-sway 1.4s ease-in-out infinite alternate;
}
@keyframes sm-fix-sway {
    from { transform: rotate(-4deg); }
    to   { transform: rotate(4deg); }
}

/* ── UPPER BODY GROUP: rotates at hips for bending/standing ──
   Hip is at SVG coordinate (20,28) in a 44×58 viewport.
   view-box makes % origins relative to the SVG viewport. */
#sm-upper {
    transform-box: view-box;
    transform-origin: 45.5% 48.3%; /* = (20,28) = hip joint */
}

/* ── JOINTED LIMB PIVOT ORIGINS ──
   fill-box makes % origins relative to each element's own bounding box.
   Bounding boxes include the full subtree, so we must account for child geometry.

   sm-luarm subtree bbox: x -12→0 (w=12), y -3→4 (h=7).  Shoulder (0,0) → 100%, 3/7=43%
   sm-rfarm subtree bbox: x -4→6  (w=10), y 0→9.5 (h=9.5). Elbow  (0,0) → 4/10=40%, 0%
   All others: joint at a corner of bbox → simple 0%/100% values work. */
#sm-luarm, #sm-lfarm,
#sm-ruarm, #sm-rfarm,
#sm-lthigh, #sm-lshin,
#sm-rthigh, #sm-rshin { transform-box: fill-box; }

#sm-luarm  { transform-origin: 100%  43%; } /* shoulder: bbox corner (0,0) at 100%,43% */
#sm-lfarm  { transform-origin: 100%   0%; } /* elbow: bbox top-right corner */
#sm-ruarm  { transform-origin:   0%   0%; } /* shoulder: bbox top-left corner */
#sm-rfarm  { transform-origin:  40%   0%; } /* elbow: (0,0) at 40% due to wrench in bbox */
#sm-lthigh { transform-origin: 100%   0%; } /* hip: bbox top-right corner */
#sm-lshin  { transform-origin: 100%   0%; } /* knee: bbox top-right corner */
#sm-rthigh { transform-origin:   0%   0%; } /* hip: bbox top-left corner */
#sm-rshin  { transform-origin:   0%   0%; } /* knee: bbox top-left corner */

/* ── RUNNING: thighs alternate forward↔back, shins bend at knee ──
   Left & right are opposite phase: left starts forward, right starts back. */
#stickman-wrap.running-in  #sm-lthigh,
#stickman-wrap.running-out #sm-lthigh { animation: lthigh-run 0.22s ease-in-out infinite alternate; }
@keyframes lthigh-run { from { transform: rotate(-26deg); } to { transform: rotate(22deg); } }

#stickman-wrap.running-in  #sm-lshin,
#stickman-wrap.running-out #sm-lshin  { animation: lshin-run  0.22s ease-in-out infinite alternate; }
@keyframes lshin-run  { from { transform: rotate(5deg);  } to { transform: rotate(52deg); } }

#stickman-wrap.running-in  #sm-rthigh,
#stickman-wrap.running-out #sm-rthigh { animation: rthigh-run 0.22s ease-in-out infinite alternate; }
@keyframes rthigh-run { from { transform: rotate(22deg);  } to { transform: rotate(-26deg); } }

#stickman-wrap.running-in  #sm-rshin,
#stickman-wrap.running-out #sm-rshin  { animation: rshin-run  0.22s ease-in-out infinite alternate; }
@keyframes rshin-run  { from { transform: rotate(52deg); } to { transform: rotate(5deg); } }

/* Running arm animation is driven by JS (stickman.js) via SVG transform attribute
   for reliable pivot around the shoulder/elbow joint (no transform-box issues). */

/* ── BENDING DOWN: slight squat + arms reach forward-down ── */
#stickman-wrap.bending-down #sm-lthigh,
#stickman-wrap.bending-down #sm-rthigh { animation: thigh-bend 0.4s ease-in-out forwards; }
@keyframes thigh-bend { to { transform: rotate(22deg); } }

#stickman-wrap.bending-down #sm-lshin,
#stickman-wrap.bending-down #sm-rshin  { animation: shin-bend  0.4s ease-in-out forwards; }
@keyframes shin-bend  { to { transform: rotate(38deg); } }

/* Right arm reaches down to grab; left arm swings back for balance.
   Angles are relative to the already-52°-leaned sm-upper group. */
#stickman-wrap.bending-down #sm-ruarm { animation: ruarm-bend 0.38s ease-in-out forwards; }
@keyframes ruarm-bend { to { transform: rotate(35deg); } }

#stickman-wrap.bending-down #sm-rfarm { animation: rfarm-bend 0.38s ease-in-out forwards; }
@keyframes rfarm-bend { to { transform: rotate(42deg); } }

#stickman-wrap.bending-down #sm-luarm { animation: luarm-bend 0.38s ease-in-out forwards; }
@keyframes luarm-bend { to { transform: rotate(-20deg); } }

#stickman-wrap.bending-down #sm-lfarm { animation: lfarm-bend 0.38s ease-in-out forwards; }
@keyframes lfarm-bend { to { transform: rotate(5deg); } }

/* ── STANDING UP ── */
#stickman-wrap.standing-up #sm-lthigh,
#stickman-wrap.standing-up #sm-rthigh { animation: thigh-stand 0.35s ease-out forwards; }
@keyframes thigh-stand { from { transform: rotate(22deg); } to { transform: rotate(0deg); } }

#stickman-wrap.standing-up #sm-lshin,
#stickman-wrap.standing-up #sm-rshin  { animation: shin-stand  0.35s ease-out forwards; }
@keyframes shin-stand  { from { transform: rotate(38deg); } to { transform: rotate(0deg); } }

#stickman-wrap.standing-up #sm-ruarm { animation: ruarm-stand 0.35s ease-out forwards; }
@keyframes ruarm-stand { from { transform: rotate(35deg); } to { transform: rotate(0deg); } }

#stickman-wrap.standing-up #sm-rfarm { animation: rfarm-stand 0.35s ease-out forwards; }
@keyframes rfarm-stand { from { transform: rotate(42deg); } to { transform: rotate(0deg); } }

#stickman-wrap.standing-up #sm-luarm { animation: luarm-stand 0.35s ease-out forwards; }
@keyframes luarm-stand { from { transform: rotate(-20deg); } to { transform: rotate(0deg); } }

#stickman-wrap.standing-up #sm-lfarm { animation: lfarm-stand 0.35s ease-out forwards; }
@keyframes lfarm-stand { from { transform: rotate(5deg); } to { transform: rotate(0deg); } }

/* ── FIXING: right upper arm raises, forearm extends with wrench ── */
#stickman-wrap.fixing #sm-ruarm { animation: ruarm-fix 0.3s ease-out forwards; }
@keyframes ruarm-fix { to { transform: rotate(-65deg); } }

#stickman-wrap.fixing #sm-rfarm { animation: rfarm-fix 0.3s 0.1s ease-out forwards; }
@keyframes rfarm-fix { to { transform: rotate(-15deg); } }

#sm-wrench { transform-box: fill-box; transform-origin: 0% 50%; }
#stickman-wrap.fixing #sm-wrench {
    animation: wrench-appear 0.2s ease-out forwards,
               wrench-turn   0.4s 0.2s ease-in-out infinite alternate;
}
@keyframes wrench-appear { from { opacity: 0; } to { opacity: 1; } }
@keyframes wrench-turn   { from { transform: rotate(-10deg); } to { transform: rotate(35deg); } }

/* ---------------- HOME / ME SECTION ---------------- */
#home {
    transform-origin: center center;
    transition: transform 0.1s linear;
    will-change: transform;
}

/* ---------------- WELCOME TEXT ---------------- */
.welcome-text {
    font-family: 'Reenie Beanie', cursive;
    font-size: 36px;
    line-height: 1.7;
    text-align: center;
    max-width: 960px;
    margin: 0 auto;
    position: relative;
    z-index: 3;
    border: 0.01px solid rgb(27, 27, 27);
    padding: 50px 60px;
    border-radius: 4px;
}

.neon-flicker {
    color: rgba(255,255,255,0.1);
    animation: neon-on 2s ease-out forwards, neon-flicker 8s 2s infinite;
}

@keyframes neon-on {
    0% {
        color: rgba(255,255,255,0.05);
        text-shadow: none;
    }
    60% {
        color: rgba(255,255,255,0.3);
        text-shadow: none;
    }
    80% {
        color: rgba(255,255,255,0.8);
        text-shadow:
            0 0 5px #fff,
            0 0 15px #ff69b4,
            0 0 30px #ff69b4;
    }
    100% {
        color: #fff;
        text-shadow:
            0 0 5px #fff,
            0 0 10px #fff,
            0 0 20px #ff69b4,
            0 0 40px #ff69b4,
            0 0 80px #ff69b4;
    }
}

@keyframes neon-flicker {
    0%,  90%,  92%,  100% {
        color: #fff;
        text-shadow:
            0 0 5px #fff,
            0 0 10px #fff,
            0 0 20px #ff69b4,
            0 0 40px #ff69b4,
            0 0 80px #ff69b4;
    }
    91% {
        color: rgba(255,255,255,0.6);
        text-shadow:
            0 0 5px #fff,
            0 0 10px #ff69b4;
    }
}

/* ---------------- SECTION TITLES ---------------- */
.section-title {
    font-size: clamp(28px, 4vw, 48px);
    text-align: center;
    margin: 40px 0 30px;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: #f5f5f7;
    position: relative;
    z-index: 3;
}

/* ---------------- ABOUT SECTION — Apple-inspired ---------------- */
#about {
    background: #f5f5f7;
    padding: 100px 20px;
    text-align: center;
}
#about .section-title {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #6e6e73;
    margin: 0 0 18px;
}
#about p {
    font-family: 'Inter', sans-serif;
    font-size: clamp(24px, 3.5vw, 40px);
    font-weight: 600;
    color: #1d1d1f;
    max-width: 720px;
    margin: 0 auto;
    line-height: 1.25;
    letter-spacing: -0.022em;
}

/* ---------------- PROJECTS SECTION ---------------- */
#projects {
    position: relative;
    overflow: hidden;
    min-height: 40vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px 0 200px;
}

.projects-bg-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.15);
    z-index: 0;
}

/* ---------------- PROJECT GRID ---------------- */
.project-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    max-width: 1200px;
    margin: auto;
    gap: 20px;
    padding: 16px;
    position: relative;
    z-index: 3;
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
}

/* ---------------- PROJECT CARD ---------------- */
.project-card {
    position: relative;
    flex: 1 1 22%;       /* 4 cards per row */
    max-width: 250px;
    
    /* Responsive height based on width */
    aspect-ratio: 5 / 7; /* width / height ratio, adjust for portrait cards */
    
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    display: block;
    color: white;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.project-card img,
.project-card video {
    width: 100%;
    height: 100%;
    object-fit: cover;   /* fills card and crops edges */
    display: block;
    transition: transform 0.3s ease; /* keeps hover zoom effect */
}

/* HOVER EFFECT */
.project-card:hover img {
    transform: scale(1.05);
}
.project-card:hover {
    transform: translateY(-5px);
}

/* CARD TEXT OVERLAY */
.card-text {
    position: absolute;
    bottom: 15px;
    left: 15px;
    right: 15px;
    z-index: 2;
}
.card-text h3 {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin: 0 0 4px 0;
    color: #ffffff;
    text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}
.card-text p {
    font-size: 12px;
    color: #e0e0e0;
    letter-spacing: 0.01em;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

/* HORIZONTAL VIGNETTE */
.project-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    background: linear-gradient(to bottom, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0) 30%, rgba(0,0,0,0.65) 70%, rgba(0,0,0,0.85) 100%);
    border-radius: 15px;
    z-index: 1;
}

/* ---------------- CONTACT SECTION ---------------- */
#contact {
    background: #000;
    padding: 100px 20px;
    text-align: center;
    position: relative;
    z-index: 31;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

#contact p {
    color: #a1a1a6;
    font-size: 17px;
    margin-bottom: 28px;
}

/* ---------------- BUTTONS ---------------- */
.button {
    display: inline-block;
    padding: 10px 22px;
    margin: 6px 6px 0;
    background: rgba(255, 255, 255, 0.08);
    color: #f5f5f7;
    text-decoration: none;
    border-radius: 980px;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.01em;
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: background 0.2s ease, border-color 0.2s ease;
}

.button:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.22);
}

/* ---------------- RESPONSIVE ---------------- */
@media(max-width: 900px) {
    .project-card { flex: 1 1 45%; max-width: none; }
}
@media(max-width: 600px) {
    .project-card { flex: 1 1 100%; }
    .welcome-text {
        font-size: 28px;
        padding: 32px 24px;
    }
    nav {
        flex-wrap: wrap;
        gap: 10px 18px;
    }
}

/* ---------------- SCROLL ANIMATION ---------------- */

.animate {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---------------- MUSIC / DJ SECTION ---------------- */
#music {
    position: relative;
    height: 100vh;
    overflow: hidden;
}

.music-link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    text-decoration: none;
    cursor: pointer;
}

.music-bg-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.music-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: rgba(0, 0, 0, 0.35);
    transition: background 0.3s ease;
}

.music-link:hover .music-overlay {
    background: rgba(0, 0, 0, 0.5);
}

.music-overlay h2 {
    font-size: clamp(36px, 5vw, 64px);
    font-weight: 700;
    color: #f5f5f7;
    margin: 0;
    letter-spacing: -0.03em;
}

.music-overlay p {
    font-size: 17px;
    color: #a1a1a6;
    margin: 0;
    letter-spacing: 0.01em;
}

/* ---------------- FILMMAKING SECTION ---------------- */
#filmmaking {
    position: relative;
    overflow: hidden;
    padding: 60px 0 80px;
}

.filmmaking-bg-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.filmmaking-content {
    position: relative;
    z-index: 1;
}

/* ---------------- FILM SCROLL SLIDER WITH CINEMATIC EFFECT ---------------- */

#film-scroll {
    height: calc(100vh * 5); /* number of videos + 1 for loop-back segment */
}

.film-scroll-wrapper {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
    cursor: grab;
}
.film-scroll-wrapper:active {
    cursor: grabbing;
}

.film-scroll-track {
    display: flex;
    height: 100%;
    width: calc(100vw * 4); /* number of videos */
    will-change: transform;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.film-scroll-track.no-transition {
    transition: none;
}

/* Navigation dots */
.film-dots {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.film-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    padding: 0;
    transition: background 0.3s ease, transform 0.3s ease;
}

.film-dot.active {
    background: white;
    transform: scale(1.35);
}

/* Floating nav inside the film wrapper — hidden until regular nav scrolls away */
.film-nav {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 28px;
    padding: 18px 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.65) 0%, transparent 100%);
    z-index: 10;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.film-nav.visible {
    opacity: 1;
    pointer-events: auto;
}

.film-nav a {
    color: white;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.5px;
    opacity: 0.85;
    transition: opacity 0.2s ease;
}

.film-nav a:hover {
    opacity: 1;
}

/* Carousel prev / next arrows */
.film-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(6px);
    color: white;
    font-size: 32px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: background 0.25s ease, border-color 0.25s ease;
    padding: 0;
    user-select: none;
}

.film-arrow:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.5);
}

.film-arrow-prev { left: 20px; }
.film-arrow-next { right: 20px; }

.film-slide {
    width: 100vw;
    height: 100vh;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.cinema-container {
    position: relative;
    height: 80vh;
    max-height: 100vh;
    width: auto;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 0 120px rgba(0,0,0,0.9);
}

.cinema-video {
    position: relative; 
    z-index: 2;
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    filter: brightness(0.9) contrast(1.05);
    transition: transform 0.5s ease, filter 0.5s ease;
}

.cinema-video:hover {
    transform: scale(1.02);
    filter: brightness(1) contrast(1.1);
}

.smoke-video {
    position: absolute;
    top: 5%;
    width: 23%;
    height: 100%;
    object-fit: cover;
    transform: translate(-50%, -50%);
    filter: blur(5px);
    z-index: 1;
    animation: smokeDrift 40s linear infinite;
    background: linear-gradient(
        to right,
        rgba(0,0,0,0.9) 0%,
        rgba(0,0,0,0) 20%,
        rgba(0,0,0,0) 80%,
        rgba(0,0,0,0.9) 100%
    );
    -webkit-mask-image: linear-gradient(
        to right,
        transparent 0%,
        black 20%,
        black 80%,
        transparent 100%
    );
}

@keyframes smokeDrift {
    0% { transform: translateY(0) scale(1.1); }
    50% { transform: translateY(-30px) scale(1.2); }
    100% { transform: translateY(0) scale(1.1); }
}

.ratio-vertical {
  aspect-ratio: 9 / 16;
}

.ratio-horizontal {
  aspect-ratio: 16 / 9;
}

.ratio-square {
  aspect-ratio: 1 / 1;
}

.films-header {
    position: absolute;
    top: -10%;
    left: 0;
    width: 100%;
    z-index: 0;
    color: white;
    font-size: 24px;
    font-weight: 600;
    text-shadow: 0 0 10px rgba(0,0,0,0.7);
    background: linear-gradient(
        to right,
        rgba(0,0,0,0.9) 0%,
        rgba(0,0,0,0) 20%,
        rgba(0,0,0,0) 80%,
        rgba(0,0,0,0.9) 100%
    );
    -webkit-mask-image: linear-gradient(
        to right,
        transparent 0%,
        black 20%,
        black 80%,
        transparent 100%
    );
}



/* ---------------- CARD STACK SCROLL EFFECT (desktop only) ---------------- */
/* Projects pins while DJ slides over it.
   DJ pins while Filmmaking + Contact slides over it.
   Filmmaking is not sticky so Contact follows naturally.
   Disabled on mobile so all project cards are scrollable. */
@media (min-width: 768px) {
    #projects   { position: sticky; top: 0; z-index: 10; height: 100vh; padding: 20px 0 80px; justify-content: flex-start; }
    #music      { position: sticky; top: 0; z-index: 20; overflow: visible; height: 100vh; }
    .music-link { height: 100vh; }
    #filmmaking { position: relative; z-index: 30; min-height: 100vh; }

    /* All 5 cards in one row so content fits within the viewport,
       leaving the 80px bottom padding visible */
    .project-card { flex: 1 1 17%; max-width: none; }
    #projects .section-title { margin: 10px 0 20px; }
    #projects .project-grid { margin: 0 auto; }
}

/* ---------------- FOOTER ---------------- */
footer {
    position: relative;
    z-index: 32;
    background: #000;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 28px 20px;
    text-align: center;
    font-size: 13px;
    color: #6e6e73;
    letter-spacing: 0.01em;
}
