/* ═══════════════════════════════════════════════════════════
   MAIN.CSS v2 — SAGIV FINGER PORTFOLIO
   Bold / Black / Orange-Red — Inspired by designbybrandin.com
   ═══════════════════════════════════════════════════════════ */

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-padding-top: var(--nav-h);
  font-size: 16px;
  background: var(--bg);
  overflow-x: hidden;
}

body {
  background-color: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.7;
  font-weight: 400;
  overflow-x: hidden;
  direction: rtl;
  text-align: right;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.8s ease, color 0.8s ease;
}

/* ── Brand logo: white SF monogram on transparent ───────── */
.nav-logo img {
  object-fit: contain;
  /* Logo is white — invert to black when page goes red */
  transition: filter var(--dur-base);
}
body.page-red .nav-logo img { filter: invert(1); }

/* Full page color change when about section is active */
body.page-red {
  background-color: var(--red);
  color: var(--black);
}

img    { display: block; max-width: 100%; }
ul     { list-style: none; }
a      { color: inherit; text-decoration: none; }
button { cursor: pointer; background: none; border: none; font: inherit; color: inherit; touch-action: manipulation; }
a      { touch-action: manipulation; }


/* ═══════════════════════════════════════════════════════════
   WEBGL SMOKE BACKGROUND CANVAS
   Full-page fixed canvas behind everything
   ═══════════════════════════════════════════════════════════ */

#smokeCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.78;   /* more red */
}


/* ── Film Grain Overlay ─────────────────────────────────────── */
.grain {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='256' height='256'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='256' height='256' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain-shift 0.4s steps(2) infinite;
  /* overflow clip prevents edge glitch from shifting background */
  overflow: hidden;
}
@keyframes grain-shift {
  /* shift background-position instead of translating the element
     so it never bleeds outside the viewport edges */
  0%   { background-position: 0 0; }
  25%  { background-position: -5% -8%; }
  50%  { background-position: 8% 3%; }
  75%  { background-position: -3% 10%; }
  100% { background-position: 5% -5%; }
}


/* ── Custom Cursor ──────────────────────────────────────────── */
.cursor, .cursor-ring {
  position: fixed;
  top: 0; left: 0;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
}
.cursor {
  width: 6px; height: 6px;
  background: var(--red);
  mix-blend-mode: normal;
}
.cursor-ring {
  width: 40px; height: 40px;
  border: 1px solid rgba(232, 43, 0, 0.4);
  transition: width 0.3s var(--ease-out), height 0.3s var(--ease-out),
              border-color 0.3s, opacity 0.3s;
}
.cursor-ring.hover {
  width: 72px; height: 72px;
  border-color: var(--red);
  background: rgba(232, 43, 0, 0.07);
}


/* ═══════════════════════════════════════════════════════════
   NAVIGATION
   ═══════════════════════════════════════════════════════════ */

.nav {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 900;
  height: var(--nav-h);
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  transition: transform 0.45s var(--ease-inout),
              opacity   0.45s var(--ease-inout),
              background var(--dur-slow) var(--ease-out),
              border-bottom-color var(--dur-base);
  border-bottom: 1px solid transparent;
  opacity: 0; /* GSAP initial reveal */
}

/* Slide nav off-screen when scrolling down */
.nav.nav-hidden {
  transform: translateY(-100%);
  opacity: 0 !important;
  pointer-events: none;
}

.nav.scrolled {
  /* Always transparent — remove solid background on scroll */
  background: transparent;
  border-bottom-color: transparent;
}
body.page-red .nav-link,
body.page-red .nav-link::after { color: var(--black); }
body.page-red .nav-burger span { background: var(--black); }

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-6);
}

/* Logo */
.nav-logo img {
  width: 42px; height: 42px;
  object-fit: contain;
  transition: opacity var(--dur-base);
  filter: invert(0);
}
body.page-red .nav-logo img { filter: invert(1); }
.nav-logo:hover img { opacity: 0.65; }

/* Desktop links */
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--sp-8);
}

.nav-link {
  font-family: var(--font-nav);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--secondary);
  position: relative;
  transition: color var(--dur-base);
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0; right: 0;
  height: 2px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-slow) var(--ease-out);
}
.nav-link:hover { color: var(--fg); }
.nav-link:hover::after { transform: scaleX(1); }

/* Mobile burger */
.nav-burger {
  display: none;
  flex-direction: column;
  gap: 6px;
  padding: 4px;
}
.nav-burger span {
  display: block;
  width: 28px; height: 2px;
  background: var(--fg);
  transition: transform var(--dur-base) var(--ease-out), opacity var(--dur-base);
}
.nav-burger.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { transform: translateY(-8px) rotate(-45deg); }

/* Mobile overlay */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 899;
  background: var(--black);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-6);
  opacity: 0;
}
.mobile-link {
  font-size: var(--text-xl);
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--fg);
  transition: color var(--dur-base);
}
.mobile-link:hover { color: var(--red); }


/* ═══════════════════════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════════════════════ */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: var(--nav-h);
  padding-inline: var(--gutter);
  overflow: hidden;
}

/* Optional video background */
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
}
.hero-video-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ── Hero full-screen image carousel ──────────────────────── */
.hero-carousel {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.hc-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-color: #0d0d0d; /* fallback when image hasn't loaded */
  opacity: 0;
  transition: opacity 1.4s ease;
  will-change: opacity;
  /* Blur images so overlaid text stays readable */
  filter: blur(2.5px);
  transform: scale(1.04); /* scale up to hide blur-edge bleed */
}
.hc-slide--active {
  opacity: 1;
}
/* Gradient overlay: lighter center so images show through */
.hero-carousel-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(to bottom,
      rgba(0,0,0,0.55) 0%,
      rgba(0,0,0,0.08) 40%,
      rgba(0,0,0,0.08) 60%,
      rgba(0,0,0,0.55) 100%);
  pointer-events: none;
}

/* Prev / Next arrow buttons */
.hc-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(0,0,0,0.32);
  color: var(--fg);
  font-size: 1.5rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.4s, background 0.25s, border-color 0.25s;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.hero:hover .hc-btn { opacity: 1; }
.hc-btn:hover { background: rgba(191,25,25,0.55); border-color: var(--red); }
/* RTL: prev = right side, next = left side */
.hc-prev { right: var(--gutter); }
.hc-next { left: var(--gutter); }

/* Dot indicators */
.hc-dots {
  position: absolute;
  bottom: 2.4rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: 8px;
  align-items: center;
}
.hc-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
  transition: background 0.3s, transform 0.3s;
  cursor: pointer;
}
.hc-dot--active {
  background: var(--red);
  transform: scale(1.4);
}

/* Small label above name */
.hero-eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: var(--sp-5);
  opacity: 0;
  direction: ltr;
}
.hero-eyebrow-dash {
  display: block;
  width: 28px; height: 2px;
  background: var(--red);
  flex-shrink: 0;
}

/* Giant name — one line, centered */
.hero-name {
  font-family: var(--font-display);
  font-size: clamp(3rem, 9vw, 9rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--fg);
  direction: ltr;
  text-align: center;
  white-space: nowrap;
  margin-bottom: var(--sp-6);
  overflow: hidden;   /* clip reveal container */
}
/* Wraps are now inline so both words sit on one line */
.hero-name-wrap {
  display: inline;
  overflow: visible;
}
.hero-name-line {
  display: inline-block;
  transform: translateY(108%);
}

/* Orange-red rule — centered */
.hero-rule {
  width: 50px;
  height: 2px;
  background: var(--red);
  margin: 0 auto var(--sp-5);
  opacity: 0;
  transform: scaleX(0);
  transform-origin: center;
}

/* Hebrew subtitle — inline centered, RTL bidi handles dot placement */
.hero-subtitle {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 300;
  color: #fff;
  letter-spacing: 0.08em;
  opacity: 0;
  transform: translateY(16px);
  display: block;
  text-align: center;
  margin: 0 auto var(--sp-8);
  direction: rtl;
  unicode-bidi: plaintext;
}
.hsubt-dot {
  color: #fff;
  opacity: 0.6;
  padding: 0 0.2em;
}

/* CTA row */
.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-5);
  opacity: 0;
  transform: translateY(16px);
  flex-wrap: wrap;
}

/* Primary button — orange-red filled */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  padding: 14px 28px;
  background: var(--red);
  color: var(--white);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border: 2px solid var(--red);
  position: relative;
  overflow: hidden;
  transition: color var(--dur-base), background var(--dur-base);
}
.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--white);
  transform: translateX(-102%);
  transition: transform var(--dur-slow) var(--ease-out);
  z-index: 0;
}
.btn-primary span, .btn-primary svg { position: relative; z-index: 1; }
.btn-primary:hover { color: var(--red); }
.btn-primary:hover::before { transform: translateX(0); }

/* Ghost button */
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 14px 28px;
  border: 2px solid var(--border);
  color: var(--secondary);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  transition: color var(--dur-base), border-color var(--dur-base);
}
.btn-ghost:hover { color: var(--fg); border-color: var(--fg); }

/* Scroll indicator — right side */
.hero-scroll {
  position: absolute;
  bottom: clamp(2rem, 4vw, 4rem);
  right: var(--gutter);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-3);
  opacity: 0;
  z-index: 3;
}
.hero-scroll-line {
  width: 1px; height: 60px;
  background: linear-gradient(to bottom, var(--red), transparent);
  animation: scroll-pulse 2.2s var(--ease-inout) infinite;
}
@keyframes scroll-pulse {
  0%,100% { transform: scaleY(0.4); transform-origin: top; opacity: 0.4; }
  50%      { transform: scaleY(1); opacity: 1; }
}
.hero-scroll-label {
  font-size: var(--text-2xs);
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
  writing-mode: vertical-lr;
}

/* Corner meta */
.hero-meta {
  position: absolute;
  bottom: clamp(2rem, 4vw, 4rem);
  left: var(--gutter);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  font-size: var(--text-2xs);
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: white;
  opacity: 0;
  z-index: 3;
}
.hero-meta--right {
  left: auto;
  right: var(--gutter);
  align-items: flex-end;
}


/* ═══════════════════════════════════════════════════════════
   MARQUEE / REEL STRIP  —  always orange-red
   ═══════════════════════════════════════════════════════════ */

.reel {
  position: relative;
  background: var(--red);
  padding: var(--sp-10) 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Moving text behind */
.reel-track {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  overflow: hidden;
  pointer-events: none;
}
.reel-track-inner {
  display: flex;
  align-items: center;
  gap: var(--sp-7);
  white-space: nowrap;
  animation: track-scroll 20s linear infinite;
  font-size: var(--text-2xl);
  font-weight: 900;
  letter-spacing: -0.02em;
  color: rgba(0,0,0,0.12);
  direction: ltr;
}
.reel-sep { font-size: 0.5em; opacity: 0.5; }
@keyframes track-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* Play button */
.reel-btn {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-5);
  opacity: 0;
  transition: transform var(--dur-slow) var(--ease-spring);
}
.reel-btn:hover { transform: scale(1.06); }

.reel-circle {
  width: 110px; height: 110px;
  border-radius: 50%;
  border: 2px solid rgba(0,0,0,0.3);
  background: rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  transition: background var(--dur-base), border-color var(--dur-base);
}
.reel-btn:hover .reel-circle {
  background: rgba(0,0,0,0.25);
  border-color: rgba(0,0,0,0.6);
}
.reel-play-icon {
  width: 28px; height: 28px;
  color: var(--black);
  margin-inline-start: 3px;
}
.reel-label {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--black);
}


/* ═══════════════════════════════════════════════════════════
   SHARED SECTION STYLES
   ═══════════════════════════════════════════════════════════ */

.section-header {
  max-width: var(--max-w);
  margin: 0 auto var(--sp-10);
  padding: 0 var(--gutter);
}

.section-eyebrow {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: var(--sp-4);
}
.section-eyebrow-num {
  font-weight: 900;
  font-size: var(--text-sm);
  color: var(--red);
}
.section-eyebrow-line {
  display: block;
  width: 32px; height: 2px;
  background: var(--red);
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--fg);
}

.section-desc {
  margin-top: var(--sp-4);
  font-size: var(--text-base);
  font-weight: 300;
  color: var(--secondary);
  max-width: 520px;
  line-height: 1.7;
}


/* ═══════════════════════════════════════════════════════════
   PROJECTS
   ═══════════════════════════════════════════════════════════ */

.projects {
  padding: var(--section-pad) 0;
}

.projects-grid {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 2px;
}

/* Grid layout
   Row 1: 2 × 16:9  |  Row 2: 1 × 16:9 + 2 × 9:16  |  Row 3: 2 × 16:9 */
.project-card:nth-child(1) { grid-column:  1 /  7; }
.project-card:nth-child(2) { grid-column:  7 / 13; }
.project-card:nth-child(3) { grid-column:  1 /  7; }
.project-card:nth-child(4) { grid-column:  7 / 10; }
.project-card:nth-child(5) { grid-column: 10 / 13; }
.project-card:nth-child(6) { grid-column:  1 /  7; }
.project-card:nth-child(7) { grid-column:  7 / 13; }

/* Cards without a video — dark gradient thumb, no pointer on link */
.project-link--no-video { cursor: default; }
.project-thumb--dark {
  background: linear-gradient(160deg, #141414 0%, #0a0a0a 100%);
}

.project-card {
  overflow: hidden;
  opacity: 0;
  transform: translateY(40px);
  position: relative;
}
.project-link {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Thumbnail */
.project-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0d0d0d;
}
/* Shorts cards — vertical 9:16 */
.project-card:nth-child(4) .project-thumb,
.project-card:nth-child(5) .project-thumb {
  aspect-ratio: 9 / 16;
}

/* YouTube thumbnail image */
.project-thumb-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-cinema) var(--ease-cinema);
}
/* Shorts thumbnails — contain so full frame is visible, no crop */
.project-card:nth-child(4) .project-thumb-img,
.project-card:nth-child(5) .project-thumb-img {
  object-fit: contain;
}

.project-card:hover .project-thumb-img { transform: scale(1.04); }

/* Orange-red left border on hover */
.project-card::before {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  right: 0;
  width: 0;
  background: var(--red);
  transition: width var(--dur-base) var(--ease-out);
  z-index: 10;
  pointer-events: none;
}
.project-card:hover::before { width: 3px; }

/* Hover overlay */
.project-hover-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0);
  transition: background var(--dur-base);
  display: flex;
  align-items: center;
  justify-content: center;
}
.project-card:hover .project-hover-overlay {
  background: rgba(0,0,0,0.35);
}

.project-play-icon {
  width: 64px; height: 64px;
  opacity: 0;
  transform: scale(0.7);
  transition: opacity var(--dur-base), transform var(--dur-slow) var(--ease-spring);
}
.project-card:hover .project-play-icon { opacity: 1; transform: scale(1); }

/* Info */
.project-info {
  padding: var(--sp-5) var(--sp-4) var(--sp-4);
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-top: 1px solid var(--border);
}
.project-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--sp-2);
}
.project-category {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--red);
}
.project-year {
  font-size: var(--text-xs);
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0.1em;
}
.project-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--fg);
  line-height: 1.1;
  margin-bottom: var(--sp-3);
  transition: color var(--dur-base);
}
.project-card:hover .project-title { color: var(--red); }
.project-desc {
  font-size: var(--text-sm);
  font-weight: 300;
  color: var(--secondary);
  line-height: 1.65;
  flex: 1;
  margin-bottom: var(--sp-3);
}
.project-role {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--red);
  letter-spacing: 0.06em;
  margin-bottom: var(--sp-4);
  opacity: 0.85;
}
.project-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: auto;
  transition: color var(--dur-base), gap var(--dur-base);
}
.project-card:hover .project-arrow { color: var(--red); gap: var(--sp-3); }


/* ═══════════════════════════════════════════════════════════
   ABOUT
   ═══════════════════════════════════════════════════════════ */

.about {
  padding: var(--section-pad) 0;
  position: relative;
  overflow: hidden;
}

/* ── Animated background paths container ─────────────────── */
.about-bg-paths {
  position: absolute;
  inset: -20% -10%;   /* extend beyond section edges so paths don't hard-clip */
  pointer-events: none;
  color: var(--red);
  opacity: 0.18;
}
.about-bg-paths svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  /* paths are drawn in a 696×316 viewBox — scale to fill section naturally */
}

/* CSS keyframe — GPU composited, zero JS per frame */
@keyframes bg-path-flow {
  0%   { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: -1800; }
}

.about-layout {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: 0.85fr 1.4fr;
  gap: clamp(3rem, 8vw, 8rem);
  align-items: start;
}

.about-portrait {
  opacity: 0;
  transform: translateY(30px);
}
.about-portrait-frame {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--surface);
  position: relative;
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.7),
    0 8px 24px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.04);
}
.about-portrait-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.about-text {
  opacity: 0;
  transform: translateY(30px);
}
/* "קצת עליי" heading — lives inside the text column */
.about-heading {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--fg);
  margin-bottom: var(--sp-7);
  padding-bottom: var(--sp-6);
  border-bottom: 1px solid var(--border);
}

.about-intro {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--fg);
  padding-bottom: var(--sp-7);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--sp-7);
}
.about-body {
  font-size: var(--text-base);
  font-weight: 400;
  color: var(--secondary);
  line-height: 1.85;
  margin-bottom: var(--sp-5);
}

/* Skills grid */
.skills {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-6);
  margin-top: var(--sp-8);
  padding-top: var(--sp-7);
  border-top: 1px solid var(--border);
}
.skill-group-title {
  font-size: var(--text-base);
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: var(--sp-4);
}
.skill-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.skill-list li {
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--secondary);
  padding-right: var(--sp-4);
  position: relative;
}
.skill-list li::before {
  content: '—';
  position: absolute;
  right: 0;
  color: var(--muted);
}


/* ═══════════════════════════════════════════════════════════
   EXPERIENCE
   ═══════════════════════════════════════════════════════════ */

.experience {
  padding: var(--section-pad) 0;
}

.timeline {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.timeline-item {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: var(--sp-8);
  padding: var(--sp-8) 0;
  opacity: 0;
  transform: translateY(30px);
}

.timeline-year-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding-top: 0.15em;
}
.timeline-year {
  font-size: var(--text-2xl);
  font-weight: 900;
  color: var(--red);
  letter-spacing: -0.04em;
  line-height: 0.85;
}
.timeline-period {
  font-size: var(--text-xs);
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0.08em;
  margin-top: var(--sp-3);
}

.timeline-role {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 900;
  color: var(--fg);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: var(--sp-2);
}
.timeline-company {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--red);
  letter-spacing: 0.08em;
  margin-bottom: var(--sp-4);
  text-transform: uppercase;
}
.timeline-desc {
  font-size: var(--text-sm);
  font-weight: 300;
  color: var(--secondary);
  line-height: 1.85;
  max-width: 560px;
}


/* ═══════════════════════════════════════════════════════════
   SHUFFLE TESTIMONIALS
   ═══════════════════════════════════════════════════════════ */

.shuffle-testi {
  padding: var(--section-pad) var(--gutter);
  position: relative;
  z-index: 1;
}

.shuffle-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 3rem;
  gap: 2.5rem;
}

/* The deck wrapper — sized to one card, offset left so stacked cards are centered */
.shuffle-deck {
  position: relative;
  width: 350px;
  height: 450px;
  margin-left: -100px;
}
@media (max-width: 600px) {
  .shuffle-deck {
    width: 290px;
    height: 400px;
    margin-left: -80px;
  }
}

.scard {
  position: absolute;
  inset: 0;
  background: rgba(14, 14, 20, 0.82);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 20px;
  padding: 2rem 1.75rem;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  user-select: none;
  text-align: center;
  direction: rtl;
  transition:
    transform 0.35s cubic-bezier(0.34, 1.2, 0.64, 1),
    box-shadow 0.35s ease;
  will-change: transform;
}
.scard[data-pos="front"] {
  cursor: grab;
  box-shadow:
    0 24px 64px rgba(0,0,0,0.55),
    0 0 0 1px rgba(191,25,25,0.12);
}
.scard[data-pos="front"]:active { cursor: grabbing; }

/* Red gradient orb — replaces avatar */
.scard-ball {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  flex-shrink: 0;
  background: radial-gradient(circle at 35% 30%,
    rgba(255, 90, 90, 0.95) 0%,
    rgba(191, 25, 25, 0.75) 45%,
    rgba(60, 5, 5, 0.25) 100%);
  filter: blur(8px);
  pointer-events: none;
}
.scard-text {
  font-size: 0.93rem;
  font-style: italic;
  color: var(--secondary);
  line-height: 1.7;
}
.scard-author {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--red);
  letter-spacing: 0.04em;
}
.scard-role {
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.06em;
}
.shuffle-hint {
  font-size: var(--text-2xs);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0.5;
}
.shuffle-footnote {
  font-size: 0.7rem;
  color: var(--muted);
  opacity: 0.4;
  direction: rtl;
  text-align: center;
  margin-top: -0.5rem;
}

/* ─── TESTIMONIAL CARDS (new card design) ──────────────────── */
.testi-cards {
  padding: var(--section-pad) var(--gutter);
  position: relative;
  z-index: 1;
}

.tc-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
  margin-top: 3rem;
}

.tc-card {
  width: 320px;
  flex-shrink: 0;
  background: #000;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.07);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.tc-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 60px rgba(0,0,0,0.6);
}

/* ── Testimonial card top — initials + ambient glow ─────── */
.card-top {
  position: relative;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #050505;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* Ambient red glow behind the initials */
.card-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 65%,
    rgba(255, 60, 60, 0.22) 0%,
    transparent 70%);
  filter: blur(28px);
  pointer-events: none;
}

/* Large low-opacity initials */
.card-initials {
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-size: 56px;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.08);
  letter-spacing: -0.02em;
  line-height: 1;
  user-select: none;
  transition: color 0.35s ease;
}
.tc-card:hover .card-initials {
  color: rgba(255, 255, 255, 0.13);
}

.tc-body {
  padding: 1rem 1.25rem 1.5rem;
  direction: rtl;
}
.tc-quote {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--secondary);
  line-height: 1.7;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding-bottom: 1rem;
  margin-bottom: 0.75rem;
}
.tc-author {
  font-size: 0.9rem;
  color: var(--fg);
  margin-bottom: 0.3rem;
}
.tc-role {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: linear-gradient(to left, #ff6666, var(--red), #8b0000);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tc-footnote {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.75);
  opacity: 1;
  direction: rtl;
  text-align: center;
  margin-top: 2.5rem;
}

/* Legacy tslider (keep rules to avoid broken selectors) */
.testimonials {
  padding: var(--section-pad) 0;
}

/* Slider outer wrapper — clips overflow */
.tslider {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.tslider-track-wrap {
  overflow: hidden;
}

/* Flex row of cards — moved via JS transform */
.tslider-track {
  display: flex;
  gap: var(--sp-5);
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
  direction: ltr; /* keep translateX math consistent regardless of RTL body */
}

/* Individual card */
.tcard {
  flex: 0 0 calc(33.333% - var(--sp-5) * 2 / 3);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: var(--sp-7) var(--sp-6);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
  transition: border-color var(--dur-base), transform var(--dur-slow) var(--ease-spring);
}
.tcard:hover {
  border-color: var(--red);
  transform: translateY(-4px);
}

/* Giant quote mark */
.tcard-quote {
  font-size: 5rem;
  line-height: 0.6;
  color: var(--red);
  font-family: Georgia, serif;
  font-weight: 900;
  opacity: 0.5;
  user-select: none;
}

.tcard-text {
  font-size: var(--text-base);
  font-weight: 300;
  color: var(--secondary);
  line-height: 1.8;
  flex: 1;
}

.tcard-footer {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--border);
}

.tcard-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  flex-shrink: 0;
  transition: border-color var(--dur-base);
}
.tcard:hover .tcard-avatar { border-color: var(--red); }

.tcard-name {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 900;
  color: var(--fg);
  letter-spacing: -0.01em;
}

.tcard-role {
  font-size: var(--text-xs);
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0.06em;
  margin-top: 2px;
}

/* Controls row */
.tslider-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--sp-7);
}

.tslider-arrows {
  display: flex;
  gap: var(--sp-3);
}

.tslider-arrow {
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--secondary);
  transition: color var(--dur-base), border-color var(--dur-base),
              background var(--dur-base);
}
.tslider-arrow:hover:not(:disabled) {
  color: var(--fg);
  border-color: var(--red);
  background: var(--red);
}
.tslider-arrow:disabled {
  opacity: 0.25;
  cursor: not-allowed;
}

/* Dot indicators */
.tslider-dots {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.tslider-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border);
  border: none;
  padding: 0;
  transition: background var(--dur-base), transform var(--dur-base) var(--ease-spring);
}
.tslider-dot.active {
  background: var(--red);
  transform: scale(1.5);
}

/* Responsive */
@media (max-width: 1100px) {
  .tcard { flex: 0 0 calc(50% - var(--sp-5) / 2); }
}
@media (max-width: 640px) {
  .tcard { flex: 0 0 100%; }
}


/* ═══════════════════════════════════════════════════════════
   CONTACT
   ═══════════════════════════════════════════════════════════ */

.contact {
  padding: var(--section-pad) 0 calc(var(--section-pad) * 2);
}
/* Tighten the gap between the contact header and the email */
.contact .section-header {
  margin-bottom: var(--sp-6);
}

.contact-layout {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.contact-email-wrap {
  opacity: 0;
  transform: translateY(30px);
  margin-bottom: var(--sp-9);
  /* no overflow:hidden — it clips the large text during GSAP reveal */
}

.contact-email {
  display: inline-block;
  font-family: var(--font-display);
  font-size: clamp(2rem, 5.5vw, 5rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--fg);
  direction: ltr;
  position: relative;
  transition: color var(--dur-base);
}
.contact-email::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0; right: 0;
  height: 3px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--dur-slow) var(--ease-out);
}
.contact-email:hover { color: var(--red); }
.contact-email:hover::after { transform: scaleX(1); transform-origin: left; }

.contact-socials {
  display: flex;
  align-items: center;
  gap: var(--sp-7);
  opacity: 0;
}
.social-link {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--secondary);
  transition: color var(--dur-base);
}
.social-link:hover { color: var(--red); }
.social-link svg {
  flex-shrink: 0;
  transition: transform var(--dur-base) var(--ease-spring);
}
.social-link:hover svg { transform: scale(1.15); }


/* ═══════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════ */

.footer {
  border-top: 1px solid var(--border);
  padding: var(--sp-7) var(--gutter);
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-5);
}
.footer-logo img {
  width: 32px; height: 32px;
  object-fit: contain;
  opacity: 0.4;
  transition: opacity var(--dur-base);
}
.footer-logo:hover img { opacity: 1; }
.footer-copy {
  font-size: var(--text-xs);
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0.08em;
}
.footer-top {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--secondary);
  transition: color var(--dur-base);
}
.footer-top:hover { color: var(--red); }


/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 1100px) {
  .projects-grid { grid-template-columns: 1fr 1fr; }
  .project-card:nth-child(1) { grid-column: 1 / 2; }
  .project-card:nth-child(2) { grid-column: 2 / 3; }
  .project-card:nth-child(3) { grid-column: 1 / 2; }
  .project-card:nth-child(4) { grid-column: 1 / 2; }
  .project-card:nth-child(5) { grid-column: 2 / 3; }
  .project-card:nth-child(6) { grid-column: 1 / 2; }
  .project-card:nth-child(7) { grid-column: 2 / 3; }

  .timeline-item { grid-template-columns: 120px 1fr; gap: var(--sp-6); }
}

@media (max-width: 900px) {
  .about-layout { grid-template-columns: 1fr; }
  .about-portrait { max-width: 380px; }
  .skills { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-burger { display: flex; }

  .projects-grid { grid-template-columns: 1fr; }
  .project-card { grid-column: 1 / -1 !important; grid-row: auto !important; }
  .project-card:nth-child(4) .project-thumb,
  .project-card:nth-child(5) .project-thumb { aspect-ratio: 9 / 16; max-height: 60vw; }

  .timeline-item { grid-template-columns: 1fr; gap: var(--sp-4); }
  .timeline-year-col { flex-direction: row; align-items: baseline; gap: var(--sp-4); }
  .timeline-year { font-size: var(--text-xl); }

  .contact-email { font-size: clamp(1.6rem, 7vw, 3rem); }
  .contact-socials { flex-wrap: wrap; gap: var(--sp-5); }

  .cursor, .cursor-ring { display: none; }

  /* Carousel arrows — always visible on touch devices */
  .hc-btn { opacity: 0.8; }
  .hc-btn:active { background: rgba(191,25,25,0.55); border-color: var(--red); }

  /* Bigger tap targets for modal close and social links */
  .vmodal-close { min-width: 48px; min-height: 48px; font-size: 1.6rem; }
  .social-link  { padding: var(--sp-3) var(--sp-4); }
}

@media (max-width: 500px) {
  .skills { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; text-align: center; align-items: center; }
  .hero-actions { flex-direction: column; align-items: flex-end; }
}


/* ═══════════════════════════════════════════════════════════
   VIDEO MODAL
   ═══════════════════════════════════════════════════════════ */

.vmodal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-6);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.vmodal.is-open {
  pointer-events: all;
  opacity: 1;
}

.vmodal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  cursor: pointer;
}

.vmodal-box {
  position: relative;
  z-index: 1;
  width: min(90vw, 880px);
  transform: scale(0.88) translateY(28px);
  transition: transform 0.4s cubic-bezier(0.34, 1.2, 0.64, 1);
}
.vmodal.is-open .vmodal-box {
  transform: scale(1) translateY(0);
}

.vmodal-close {
  position: absolute;
  top: -44px;
  left: 0;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.3rem;
  cursor: pointer;
  padding: 8px 12px;
  line-height: 1;
  transition: color 0.2s, transform 0.2s;
}
.vmodal-close:hover { color: white; transform: scale(1.15); }

/* 16:9 default */
.vmodal-iframe-wrap {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  background: #000;
  overflow: hidden;
}
/* 9:16 for shorts */
.vmodal-iframe-wrap.is-short {
  padding-bottom: 0;
  width: min(50vw, 380px);
  height: min(88.8vw, 676px);
  margin: 0 auto;
}

.vmodal-iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

@media (max-width: 600px) {
  .vmodal-iframe-wrap.is-short {
    width: 80vw;
    height: calc(80vw * 16 / 9);
  }
}


/* ═══════════════════════════════════════════════════════════
   SCROLL REVEAL  —  Intersection Observer system
   Usage: add class "reveal" to any element.
   Stagger: add "reveal-d1" / "reveal-d2" / "reveal-d3" for delay.
   ═══════════════════════════════════════════════════════════ */

.reveal {
  opacity: 0;
  transform: translateY(26px) scale(0.985);
  transition:
    opacity  0.75s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    transform 0.75s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: opacity, transform;
}

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

/* Stagger helpers — add alongside .reveal */
.reveal-d1 { transition-delay: 0.10s; }
.reveal-d2 { transition-delay: 0.20s; }
.reveal-d3 { transition-delay: 0.30s; }
.reveal-d4 { transition-delay: 0.40s; }
