:root {
  --bg: #0b0b0a;
  --fg: #f3f1ec;
  --fg-dim: rgba(243, 241, 236, 0.62);
  --fg-faint: rgba(243, 241, 236, 0.38);
  --line: rgba(243, 241, 236, 0.14);
  --display: "Outfit", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* Header */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 5vw;
  transition: background 0.4s ease, padding 0.4s ease, border-color 0.4s ease;
  border-bottom: 1px solid transparent;
}

.site-header.scrolled {
  background: rgba(11, 11, 10, 0.86);
  backdrop-filter: blur(10px);
  padding: 16px 5vw;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.14rem;
  letter-spacing: 0.01em;
  font-variant: small-caps;
  white-space: nowrap;
  flex-shrink: 0;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.header-nav a {
  opacity: 0.82;
  transition: opacity 0.25s ease;
}

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

.social-links {
  display: flex;
  gap: 20px;
  padding-left: 20px;
  margin-left: 4px;
  border-left: 1px solid var(--line);
}

.social-links a { opacity: 0.6; font-size: 0.74rem; }
.social-links a:hover { opacity: 1; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 26px;
  height: 20px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.nav-toggle span {
  display: block;
  height: 1px;
  background: var(--fg);
  opacity: 0.85;
}

/* Icon nav — quick-access menu centered over the splash page's hero photo.
   Splash page (index.html) only — not part of the shared header, and not on
   any sub page (photography.html included). Photos come from menu_icons/
   (Elad holding cardboard cutouts), shown as color-boosted squares. */

.icon-nav {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-content: center;
  align-items: center;
  justify-content: center;
  gap: 28px;
  max-width: min(92vw, 900px);
  margin: 0 auto;
  pointer-events: none;
}

.icon-nav-item {
  position: relative;
  display: block;
  pointer-events: auto;
}

/* Three independent timings per icon, layered thinnest-on-top: the primary
   sway (--float-dur, shortest — this is the "base" that was still visibly
   looping on its own), a secondary jitter on top of it (--turb-dur), and a
   slow background drift underneath both (--drift-dur, longest). All three
   are deliberately non-commensurate with each other (no small-integer ratio
   between any pair), so the combined shape's true repeat period is roughly
   their LCM — long enough that it doesn't read as looping over any normal
   hover. Also staggered across icons so, if two are focused at once
   (mouse + keyboard), they don't move in unison either. */
.icon-nav-item:nth-child(1) { --float-dur: 6.8s; --turb-dur: 14.25s; --drift-dur: 23s; }
.icon-nav-item:nth-child(2) { --float-dur: 7.8s; --turb-dur: 17.25s; --drift-dur: 31s; }
.icon-nav-item:nth-child(3) { --float-dur: 6.2s; --turb-dur: 12s;   --drift-dur: 19s; }
.icon-nav-item:nth-child(4) { --float-dur: 7.4s; --turb-dur: 19.9s; --drift-dur: 28s; }
.icon-nav-item:nth-child(5) { --float-dur: 8.4s; --turb-dur: 16.5s; --drift-dur: 35s; }

.icon-nav-thumb-wrap {
  position: relative;
  display: block;
  width: 144px;
  height: 144px;
  /* Perspective for .icon-nav-float's 3D tilt below — established on the
     parent so each icon gets its own local vanishing point rather than
     sharing one across the whole row. */
  perspective: 500px;
  /* The lift and the grow are on separate CSS properties (`transform` for
     the translateY, the standalone `scale` property for the size) so each
     can carry its own transition speed — the grow runs at 1/5 the lift's
     speed (6s vs. 1.2s), rather than both being forced to match just because
     they'd otherwise be baked into one `transform` value. Both live here,
     separate from the wind wobble one layer in on .icon-nav-float, so none
     of the three fight over timing. */
  transition: transform 1.2s cubic-bezier(0.22, 0.61, 0.36, 1),
              scale 6s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.icon-nav-item:hover .icon-nav-thumb-wrap,
.icon-nav-item:focus-visible .icon-nav-thumb-wrap {
  transform: translateY(-6px);
  scale: 1.1;
}

.icon-nav-drift {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
}

.icon-nav-item:hover .icon-nav-drift,
.icon-nav-item:focus-visible .icon-nav-drift {
  animation: icon-drift var(--drift-dur, 25s) ease-in-out infinite;
}

/* The slow background layer — a longer, wider wander that the faster sway
   and jitter ride on top of. On its own it would read as an icon slowly
   leaning around; combined with the other two layers it's what keeps the
   overall motion from ever quite resolving into a recognizable loop. */
@keyframes icon-drift {
  0%   { transform: translate3d(0, 0, 0)           rotateX(0deg)  rotateY(0deg)  rotateZ(0deg); }
  14%  { transform: translate3d(-3px, 3px, -6px)    rotateX(3deg)  rotateY(-5deg) rotateZ(1.4deg); }
  31%  { transform: translate3d(4px, -2px, 8px)     rotateX(-4deg) rotateY(6deg)  rotateZ(-1.8deg); }
  47%  { transform: translate3d(-2px, -4px, -5px)   rotateX(2deg)  rotateY(-4deg) rotateZ(1.1deg); }
  63%  { transform: translate3d(3px, 2px, 7px)      rotateX(-3deg) rotateY(5deg)  rotateZ(-1.5deg); }
  79%  { transform: translate3d(-4px, -1px, -7px)   rotateX(4deg)  rotateY(-6deg) rotateZ(1.9deg); }
  92%  { transform: translate3d(2px, 3px, 5px)      rotateX(-2deg) rotateY(3deg)  rotateZ(-1deg); }
  100% { transform: translate3d(0, 0, 0)           rotateX(0deg)  rotateY(0deg)  rotateZ(0deg); }
}

.icon-nav-float {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
}

.icon-nav-item:hover .icon-nav-float,
.icon-nav-item:focus-visible .icon-nav-float {
  animation: icon-float var(--float-dur, 6.8s) ease-in-out infinite;
}

/* A held-up cutout catching a breeze — genuinely tilting in space (rotateX/Y,
   not just the in-plane rotateZ a flat card would get), plus a little push
   toward/away from the viewer on Z, so it reads as fluttering rather than
   sliding around on a flat pane. Offsets are relative to the (already-lifted)
   resting position on the parent, not an absolute one — this layer only adds
   the sway on top of that lift. Keyframe stops are deliberately unevenly
   spaced (not a clean 0/17/33/50 grid) so one cycle alone doesn't read as a
   metronome — see .icon-nav-turbulence below for the second, faster layer
   that breaks up the repeat further. */
@keyframes icon-float {
  0%   { transform: translate3d(0, 0, 0)             rotateX(0deg)   rotateY(0deg)   rotateZ(0deg); }
  12%  { transform: translate3d(2px, -3px, 7px)       rotateX(-5deg)  rotateY(6deg)   rotateZ(-1.8deg); }
  27%  { transform: translate3d(-2.5px, 2px, -9px)    rotateX(6deg)   rotateY(-8deg)  rotateZ(2.4deg); }
  44%  { transform: translate3d(1.5px, -5px, 5px)     rotateX(-4deg)  rotateY(5deg)   rotateZ(-1.2deg); }
  58%  { transform: translate3d(-1px, 0px, -5px)      rotateX(3deg)   rotateY(-4deg)  rotateZ(1deg); }
  76%  { transform: translate3d(2.5px, -4px, 9px)     rotateX(-7deg)  rotateY(9deg)   rotateZ(-2.6deg); }
  91%  { transform: translate3d(-1.5px, 1px, -4px)    rotateX(3deg)   rotateY(-3deg)  rotateZ(1.4deg); }
  100% { transform: translate3d(0, 0, 0)             rotateX(0deg)   rotateY(0deg)   rotateZ(0deg); }
}

.icon-nav-turbulence {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
}

.icon-nav-item:hover .icon-nav-turbulence,
.icon-nav-item:focus-visible .icon-nav-turbulence {
  animation: icon-turbulence var(--turb-dur, 10s) ease-in-out infinite;
}

/* Small gusts riding on top of the slow sway above. Runs at its own
   (non-commensurate) duration, so the two layers drift in and out of phase
   with each other rather than locking into a single repeating combined
   shape — that drift is what actually reads as "turbulence" over a normal
   hover, versus one clean sine wave. */
@keyframes icon-turbulence {
  0%   { transform: translate3d(0, 0, 0)          rotateY(0deg)    rotateZ(0deg); }
  9%   { transform: translate3d(1.2px, -0.8px, 3px)  rotateY(2deg)    rotateZ(0.9deg); }
  23%  { transform: translate3d(-0.9px, 1.1px, -2px) rotateY(-1.6deg) rotateZ(-1.1deg); }
  38%  { transform: translate3d(1.4px, 0.6px, 2px)   rotateY(1.4deg)  rotateZ(0.6deg); }
  54%  { transform: translate3d(-1.1px, -0.9px, -3px) rotateY(-2deg)  rotateZ(-0.8deg); }
  71%  { transform: translate3d(0.8px, 1.3px, 2px)   rotateY(1.8deg)  rotateZ(1.2deg); }
  88%  { transform: translate3d(-1.3px, -0.5px, -1px) rotateY(-1.2deg) rotateZ(-0.7deg); }
  100% { transform: translate3d(0, 0, 0)          rotateY(0deg)    rotateZ(0deg); }
}

.icon-nav-thumb {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 6px 16px -10px rgba(0, 0, 0, 0.8);
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

.icon-nav-item:hover .icon-nav-thumb,
.icon-nav-item:focus-visible .icon-nav-thumb {
  border-color: rgba(243, 241, 236, 0.55);
  box-shadow: 0 16px 22px -12px rgba(0, 0, 0, 0.85);
}

.icon-nav-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: url('#icon-gamma') saturate(2.2) contrast(1.08);
}

/* The 2.2 saturation boost and the gamma correction were both tuned against
   desktop rendering and read as too much on phones (same 700px "is this a
   phone" threshold main.js's isMobileVertical() uses) — knock saturation
   back to 1 and drop the gamma filter entirely there (both back to the
   source photos' untouched levels), keep contrast, keep the full boosted
   look on desktop/tablet. */
@media (max-width: 700px) {
  .icon-nav-thumb img {
    filter: saturate(1) contrast(1.08);
  }
}

/* Sits on .icon-nav-thumb-wrap (outside .icon-nav-float) so it rises with the
   icon's lift but doesn't jitter with the wind sway — stays flat and legible.
   No scrim behind it (tried, dropped) — relies on its own text-shadow instead. */
.icon-nav-label {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.94);
  white-space: nowrap;
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7), 0 0 14px rgba(0, 0, 0, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.icon-nav-item:hover .icon-nav-label,
.icon-nav-item:focus-visible .icon-nav-label {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* A handful of dust motes that fly outward from the icon on hover. */

.icon-nav-sparkle {
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
}

.icon-nav-sparkle i {
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--size, 3px);
  height: var(--size, 3px);
  margin-top: calc(var(--size, 3px) * -0.5);
  margin-left: calc(var(--size, 3px) * -0.5);
  background: var(--dust-color, #f3e7c9);
  border-radius: var(--dust-radius, 50%);
  box-shadow: 0 0 6px 1px rgba(243, 231, 201, 0.8);
  opacity: 0;
}

/* Per-dot look only — size/shape/color, deliberately uneven (round dots vs.
   tiny rotated-square "diamonds", a couple of warmer whites mixed into the
   gold) so the 9 dots don't read as a uniform ring. The MOTION (position,
   timing, rotation of the whole burst) is intentionally not here — it's
   driven entirely from js/icon-nav.js via the Web Animations API instead of
   a CSS animation-name triggered by :hover. A CSS @keyframes rule reading
   var(--sx) etc. is not reliably re-resolved on every animation restart
   across browsers, which is why an earlier version of this (randomizing
   those custom properties from JS, but still letting :hover trigger a CSS
   `animation-name`) silently kept replaying the same first-ever burst no
   matter how often the properties were updated. Baking the freshly
   randomized numbers directly into each Animation's keyframes sidesteps
   that ambiguity entirely — don't move the motion back into CSS custom
   properties without re-testing that it actually varies from a real :hover
   (not a synthetic dispatchEvent, which never triggers :hover at all). */
.icon-nav-sparkle i:nth-child(1) { --size: 4px; }
.icon-nav-sparkle i:nth-child(2) { --size: 3px; --dust-radius: 2px; }
.icon-nav-sparkle i:nth-child(3) { --size: 5px; }
.icon-nav-sparkle i:nth-child(4) { --size: 3px; --dust-radius: 2px; }
.icon-nav-sparkle i:nth-child(5) { --size: 2px; }
.icon-nav-sparkle i:nth-child(6) { --size: 4px; }
.icon-nav-sparkle i:nth-child(7) { --size: 3px; --dust-radius: 2px; --dust-color: #fff3d6; }
.icon-nav-sparkle i:nth-child(8) { --size: 6px; --dust-color: #ffe9b8; }
.icon-nav-sparkle i:nth-child(9) { --size: 3px; }

@media (max-width: 480px) {
  .icon-nav { gap: 18px; }
  .icon-nav-label { font-size: 0.6rem; }
}

/* Hero */

.hero {
  position: relative;
  height: 100vh;
  min-height: 560px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

#hero-bg-container {
  position: absolute;
  inset: 0;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.08);
  transition: opacity 2.4s ease, transform 9s ease;
}

.hero-bg.active {
  opacity: 1;
  transform: scale(1);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.28) 0%, rgba(0,0,0,0.15) 40%, rgba(6,6,5,0.86) 100%);
}

.scroll-cue {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  width: 1px;
  height: 46px;
  background: var(--fg-faint);
  overflow: hidden;
}

.scroll-cue span {
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--fg);
  animation: scrollcue 2.2s ease-in-out infinite;
}

@keyframes scrollcue {
  0% { top: -100%; }
  60% { top: 100%; }
  100% { top: 100%; }
}

/* Gallery */

.work {
  padding: 12vh 5vw 8vh;
}

.gallery {
  column-count: 1;
  column-gap: 18px;
}

@media (min-width: 620px) {
  .gallery { column-count: 2; }
}

@media (min-width: 1000px) {
  .gallery { column-count: 3; }
}

@media (min-width: 1500px) {
  .gallery { column-count: 4; }
}

.gallery figure {
  margin: 0 0 18px;
  break-inside: avoid;
  overflow: hidden;
  cursor: pointer;
  background: #141412;
}

.gallery img {
  display: block;
  width: 100%;
  height: auto;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 0.7s ease, filter 0.5s ease;
  filter: grayscale(0.06);
}

.gallery img.loaded {
  opacity: 1;
  transform: scale(1);
}

.gallery figure:hover img {
  transform: scale(1.03);
  filter: grayscale(0) contrast(1.03);
}

/* Subtle cue that the gallery is only a rotating subset of the full set —
   click reshuffles in a new random selection. Deliberately understated: a
   small dotted circle, not a labeled "load more" button. */
.more-cue {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 52px;
  height: 52px;
  margin: 3vh auto 1vh;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: none;
  cursor: pointer;
  transition: border-color 0.3s ease, transform 0.3s ease, background 0.3s ease;
}

.more-cue:hover {
  border-color: var(--fg-dim);
  background: rgba(243, 241, 236, 0.04);
  transform: scale(1.08);
}

.more-cue span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--fg-faint);
  transition: background 0.3s ease;
}

.more-cue:hover span {
  background: var(--fg-dim);
}

.more-cue.pulse span {
  animation: more-cue-pulse 0.5s ease;
}
.more-cue.pulse span:nth-child(2) { animation-delay: 0.06s; }
.more-cue.pulse span:nth-child(3) { animation-delay: 0.12s; }

@keyframes more-cue-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.8); }
}

/* Footer / Contact page */

footer {
  padding: 10vh 5vw 6vh;
  text-align: center;
  border-top: 1px solid var(--line);
}

.contact-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10vh 5vw;
}

/* Persistent contact bar, shown at the bottom of every other page so those
   links are always reachable without scrolling back up to the nav. */
.mini-footer {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 28px;
  padding: 4vh 5vw;
}
.mini-footer a {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-dim);
  transition: color 0.25s ease;
}
.mini-footer a:hover { color: var(--fg); }

.footer-name {
  font-family: var(--display);
  font-weight: 300;
  font-size: 0.96rem;
  letter-spacing: 0.01em;
  margin: 0 0 0.5em;
  font-variant: small-caps;
}

.footer-title {
  margin: 0 0 1.4em;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-dim);
}

.footer-email {
  display: inline-block;
  margin: 0 0 2.4em;
  font-size: 0.85rem;
  letter-spacing: 0.01em;
  color: var(--fg-dim);
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
  transition: color 0.25s ease, border-color 0.25s ease;
}

.footer-email:hover {
  color: var(--fg);
  border-color: var(--fg-dim);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 34px;
  margin-bottom: 3em;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.footer-links a { opacity: 0.68; transition: opacity 0.25s ease; }
.footer-links a:hover { opacity: 1; }

.footer-copy {
  margin: 0;
  font-size: 0.72rem;
  color: var(--fg-faint);
}

/* Lightbox */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(6, 6, 5, 0.97);
}

.lightbox.open {
  display: flex;
  animation: fadein 0.25s ease;
}

@keyframes fadein {
  from { opacity: 0; }
  to { opacity: 1; }
}

.lb-image {
  max-width: 88vw;
  max-height: 86vh;
  object-fit: contain;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.lb-close, .lb-prev, .lb-next {
  position: absolute;
  background: none;
  border: none;
  color: var(--fg);
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.lb-close:hover, .lb-prev:hover, .lb-next:hover { opacity: 1; }

.lb-close {
  top: 24px;
  right: 5vw;
  font-size: 2rem;
  font-weight: 300;
  line-height: 1;
}

.lb-prev, .lb-next {
  top: 50%;
  transform: translateY(-50%);
  font-size: 3rem;
  font-family: var(--display);
  font-weight: 400;
  padding: 0 18px;
}

.lb-prev { left: 1vw; }
.lb-next { right: 1vw; }

.lb-counter {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--fg-dim);
}

@media (max-width: 900px) {
  .nav-toggle { display: flex; }

  /* Page links + socials were previously just hidden on mobile with no other
     way to reach them (Music Videos/Contact had no mobile entry point at
     all). Now they live in a dropdown panel toggled by .nav-toggle. */
  .header-nav {
    position: absolute;
    top: 100%;
    left: 5vw;
    right: 5vw;
    margin-top: 12px;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    background: rgba(11, 11, 10, 0.94);
    backdrop-filter: blur(10px);
    border: 1px solid var(--line);
    padding: 24px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
  }

  .header-nav.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .social-links {
    border-left: none;
    padding-left: 0;
    margin-left: 0;
    gap: 16px;
  }
}

@media (max-width: 640px) {
  .lb-prev, .lb-next { font-size: 2rem; padding: 0 10px; }
}
