/* The CV (/cv). One long page for recruiters: who, what he builds, how to reach
   him, then the creative work. Hebrew first (logical properties throughout, so
   the English page mirrors it). Prints to a clean A4 (see the end).
   The idea: an engineer's notebook set like a magazine. Precise mono labels and
   hairlines against a large Hebrew serif; one green, one burnt-orange spark. */
:root {
  --bg: #0e1412;
  --surface: #141c1a;
  --ink: #e9efec;
  --soft: #c3cfcb;
  --muted: #8f9e99;
  --line: #253130;
  --accent: #62cbb6;
  --accent-ink: #06201c;
  --accent-wash: #132d28;
  --signal: #f08a4b;
  --chip: #1b2523;
  --shadow: 0 24px 48px -30px rgb(0 0 0 / 0.7);

  --display: 'Frank Ruhl Libre', 'Times New Roman', serif;
  --body: 'IBM Plex Sans Hebrew', 'IBM Plex Sans', system-ui, sans-serif;
  /* Hebrew inside a mono label takes the sans font, not a generic monospace. */
  --mono: 'IBM Plex Mono', 'IBM Plex Sans Hebrew', ui-monospace, 'Cascadia Mono', monospace;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.22rem;
  --step-2: clamp(1.4rem, 2.4vw, 1.75rem);
  --step-3: clamp(2.4rem, 6.4vw, 5rem);
  --step-4: clamp(3.4rem, 15vw, 10rem);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-quart: cubic-bezier(0.25, 1, 0.5, 1);

  --radius: 14px;
  --wrap: 78rem;
  --gutter: clamp(16px, 4.5vw, 48px);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--step-0);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--accent); color: var(--accent-ink); }
img { max-width: 100%; display: block; }
a { color: var(--accent); text-underline-offset: 0.22em; text-decoration-thickness: 1px; transition: color 0.3s var(--ease-quart), text-decoration-thickness 0.3s var(--ease-quart); }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }
h1, h2, h3 { text-wrap: balance; margin: 0; }
p { margin: 0; text-wrap: pretty; }
[hidden] { display: none !important; }
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; inset-inline-start: 8px; top: -60px; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 6px; z-index: 20; }
.skip:focus { top: 8px; }
.arrow { font-size: 0.85em; margin-inline-start: 0.2em; display: inline-block; transition: transform 0.4s var(--ease-out); }
[dir='rtl'] .arrow { transform: scaleX(-1); }
a:hover > .arrow { transform: translate(2px, -2px); }
[dir='rtl'] a:hover > .arrow { transform: scaleX(-1) translate(2px, -2px); }

/* ---------- top bar ---------- */
.bar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.progress {
  position: absolute;
  inset-inline: 0;
  bottom: -1px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(var(--p, 0));
  transform-origin: left;
}
[dir='rtl'] .progress { transform-origin: right; }
.bar .wrap { display: flex; align-items: center; gap: 1.75rem; min-height: 3.6rem; padding-block: 0.4rem; }
.bar .mark { font-family: var(--display); font-weight: 900; font-size: var(--step-1); color: var(--ink); text-decoration: none; white-space: nowrap; letter-spacing: -0.01em; }
.bar .mark::after { content: '.'; color: var(--signal); }
.bar nav { display: flex; gap: 1.5rem; margin-inline-end: auto; overflow-x: auto; scrollbar-width: none; }
.bar nav a {
  color: var(--muted);
  text-decoration: none;
  font: 500 0.78rem / 1 var(--mono);
  letter-spacing: 0.04em;
  white-space: nowrap;
  padding-block: 0.5rem;
  position: relative;
}
.bar nav a::after {
  content: '';
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s var(--ease-out);
}
[dir='rtl'] .bar nav a::after { transform-origin: right; }
.bar nav a:hover, .bar nav a[aria-current='true'] { color: var(--ink); }
.bar nav a:hover::after, .bar nav a[aria-current='true']::after { transform: scaleX(1); }
.tools { display: flex; gap: 0.5rem; margin-inline-start: auto; }
.tool {
  font: 500 0.78rem / 1 var(--mono);
  background: none;
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  cursor: pointer;
  text-decoration: none;
  min-height: 2.15rem;
  display: inline-flex;
  align-items: center;
  transition: border-color 0.3s var(--ease-quart), background-color 0.3s var(--ease-quart), color 0.3s var(--ease-quart);
}
.tool:hover { border-color: var(--ink); background: var(--ink); color: var(--bg); }
@media (max-width: 760px) { .bar nav { display: none; } }

/* ---------- hero ---------- */
.hero { padding-block: clamp(1.75rem, 5vw, 3.5rem) clamp(2.5rem, 6vw, 4.5rem); position: relative; }
.hero::before {
  /* a faint grid behind the name: a developer's notebook */
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse 60% 70% at 70% 35%, #000 0%, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 70% 35%, #000 0%, transparent 72%);
  opacity: 0.5;
  pointer-events: none;
}
[dir='ltr'] .hero::before { mask-image: radial-gradient(ellipse 60% 70% at 30% 35%, #000 0%, transparent 72%); -webkit-mask-image: radial-gradient(ellipse 60% 70% at 30% 35%, #000 0%, transparent 72%); }
.hero .wrap { position: relative; }
.hero-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.kicker { font: 500 0.75rem / 1 var(--mono); color: var(--muted); letter-spacing: 0.14em; text-transform: uppercase; }
.avail {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font: 500 var(--step--1) / 1.3 var(--mono);
  color: var(--accent);
  background: var(--accent-wash);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  border-radius: 999px;
  padding: 0.4rem 0.95rem;
}
.pulse { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; animation: pulse 2.4s var(--ease-out) infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent); } 70%, 100% { box-shadow: 0 0 0 9px transparent; } }

.hero h1 {
  font-family: var(--display);
  font-size: var(--step-4);
  line-height: 0.84;
  font-weight: 900;
  letter-spacing: -0.035em;
  margin-block: clamp(1.75rem, 5vw, 3.25rem) clamp(1.75rem, 4.5vw, 3rem);
  padding-block-end: clamp(1.25rem, 3vw, 2.25rem);
  border-bottom: 1px solid var(--ink);
  overflow-wrap: anywhere;
}
.hero h1::after { content: '.'; color: var(--signal); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(16rem, 21rem); gap: clamp(2rem, 6vw, 5rem); align-items: start; }
@media (max-width: 880px) { .hero-grid { grid-template-columns: minmax(0, 1fr); } }
.hero-main { display: grid; gap: 1.4rem; min-width: 0; }
.roles { display: flex; flex-wrap: wrap; gap: 0.25rem 0; font-family: var(--display); font-size: var(--step-2); font-weight: 500; color: var(--muted); line-height: 1.3; }
.roles span:not(:last-child)::after { content: '/'; color: var(--signal); opacity: 0.6; margin-inline: 0.55em; font-weight: 400; }
.roles span:first-child { color: var(--ink); font-weight: 700; }
.lede { max-width: 38rem; color: var(--soft); font-size: var(--step-1); line-height: 1.65; }
.actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.3rem; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2.9rem;
  padding: 0.6rem 1.3rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--surface);
  text-decoration: none;
  font: 500 var(--step--1) / 1.2 var(--body);
  cursor: pointer;
  transition: border-color 0.3s var(--ease-quart), background-color 0.3s var(--ease-quart), color 0.3s var(--ease-quart), transform 0.5s var(--ease-out);
}
.btn:hover { border-color: var(--ink); transform: translateY(-2px); }
.btn:active { transform: translateY(0); transition-duration: 0.1s; }
.btn.primary { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn.primary:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

.stats { list-style: none; margin: 0.6rem 0 0; padding: 1.1rem 0 0; display: flex; flex-wrap: wrap; gap: 0.75rem 2.75rem; border-top: 1px solid var(--line); }
.stats li { display: flex; align-items: baseline; gap: 0.6rem; }
.stats b { font: 900 clamp(2.2rem, 4vw, 3rem) / 1 var(--display); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.stats span { font: 500 0.75rem / 1.2 var(--mono); color: var(--muted); letter-spacing: 0.06em; }

.reach {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.8rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem 1.4rem;
  box-shadow: var(--shadow);
  min-width: 0;
}
.reach .label { font: 500 0.72rem / 1 var(--mono); color: var(--muted); letter-spacing: 0.14em; text-transform: uppercase; }
.reach .email { font: 500 var(--step-0) / 1.4 var(--mono); direction: ltr; text-align: start; overflow-wrap: anywhere; color: var(--ink); text-decoration-color: var(--accent); }
.reach .email:hover { color: var(--accent); }
[dir='rtl'] .reach .email { text-align: right; }
.reach ul { list-style: none; margin: 0; padding: 0; display: grid; min-width: 0; border-top: 1px solid var(--line); }
.reach li { min-width: 0; }
.reach li a { min-width: 0; display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding-block: 0.7rem; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 500; transition: color 0.3s var(--ease-quart), padding 0.5s var(--ease-out); }
.reach li a:hover { color: var(--accent); padding-inline-start: 0.4rem; }
.reach li a > span:first-child { flex: none; }
.reach .host { font: 400 0.72rem / 1.2 var(--mono); color: var(--muted); direction: ltr; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 0 1 auto; }

/* ---------- load: the page assembles itself, top to bottom ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }
@keyframes unveil { from { clip-path: inset(0 0 100% 0); transform: translateY(0.35em); } to { clip-path: inset(-0.2em -0.2em -0.2em -0.2em); transform: none; } }
@keyframes draw { from { border-bottom-color: transparent; } }
.hero-top { animation: rise 0.9s var(--ease-out) both; }
.hero h1 { animation: unveil 1.2s var(--ease-out) 0.12s both, draw 1.2s var(--ease-out) 0.5s both; }
.roles { animation: rise 1s var(--ease-out) 0.38s both; }
.lede { animation: rise 1s var(--ease-out) 0.48s both; }
.actions { animation: rise 1s var(--ease-out) 0.58s both; }
.stats { animation: rise 1s var(--ease-out) 0.68s both; }
.reach { animation: rise 1.1s var(--ease-out) 0.62s both; }
.marquee { animation: rise 1.1s var(--ease-out) 0.85s both; }

/* ---------- the tools, running past ---------- */
.marquee {
  overflow: hidden;
  border-block: 1px solid var(--line);
  padding-block: clamp(0.9rem, 2vw, 1.3rem);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee .track { display: flex; width: max-content; animation: marquee 70s linear infinite; }
[dir='rtl'] .marquee .track { animation-name: marquee-rtl; }
.marquee:hover .track { animation-play-state: paused; }
.marquee .run { display: flex; align-items: center; gap: clamp(1.1rem, 2.4vw, 2rem); padding-inline-end: clamp(1.1rem, 2.4vw, 2rem); direction: ltr; }
.marquee span { font: 700 clamp(1.5rem, 3.4vw, 2.6rem) / 1.1 var(--display); letter-spacing: -0.015em; white-space: nowrap; color: var(--ink); }
.marquee span:nth-child(4n + 3) { color: transparent; -webkit-text-stroke: 1px var(--ink); }
.marquee i { width: 0.5rem; height: 0.5rem; background: var(--signal); transform: rotate(45deg); flex: none; }
/* Constant speed is the point of a ticker, so this one loop runs linear. */
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes marquee-rtl { to { transform: translateX(50%); } }

/* ---------- sections ---------- */
section.block { padding-block: clamp(3.5rem, 9vw, 7rem); }
section.block + section.block { border-top: 1px solid var(--line); }
.head { display: flex; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.head .num { font: 500 0.8rem / 1 var(--mono); color: var(--signal); padding-top: 0.5em; letter-spacing: 0.06em; }
.head h2 { font-family: var(--display); font-size: var(--step-3); font-weight: 900; line-height: 0.95; letter-spacing: -0.03em; }
.head .count { font: 400 var(--step--1) / 1 var(--mono); color: var(--muted); margin-inline-start: auto; align-self: flex-end; }
.intro { color: var(--muted); max-width: 42rem; white-space: pre-line; font-size: var(--step-1); }
.head + *, .intro + * { margin-top: clamp(2rem, 4vw, 3.25rem); }
.head + .intro { margin-top: 0.9rem; }

.chips { display: flex; flex-wrap: wrap; gap: 0.35rem; padding: 0; margin: 0; list-style: none; }
.chips li { font: 400 0.74rem / 1.5 var(--mono); background: var(--chip); color: var(--soft); border-radius: 999px; padding: 0.14rem 0.62rem; direction: ltr; }
.links { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.35rem 1.4rem; font-size: var(--step--1); font-weight: 600; }
.links a { text-decoration: none; padding-block: 0.15rem; background: linear-gradient(currentColor, currentColor) no-repeat 0 100% / 100% 1px; transition: background-size 0.5s var(--ease-out), color 0.3s var(--ease-quart); }
.links a:hover { background-size: 100% 2px; color: var(--ink); }
.links .note { color: var(--muted); font-weight: 400; flex-basis: 100%; }

/* ---------- projects: an editorial index, media switching sides ---------- */
.projects { display: grid; counter-reset: p; }
.project {
  display: grid;
  grid-template-columns: clamp(3.5rem, 7vw, 6.5rem) minmax(0, 1fr) minmax(0, 1.1fr);
  grid-template-areas: 'idx text media';
  gap: clamp(1.25rem, 3.5vw, 3rem);
  padding-block: clamp(2rem, 5vw, 3.75rem);
  border-top: 1px solid var(--line);
  align-items: start;
}
.project:last-child { border-bottom: 1px solid var(--line); }
.project:nth-child(even) { grid-template-columns: clamp(3.5rem, 7vw, 6.5rem) minmax(0, 1.1fr) minmax(0, 1fr); grid-template-areas: 'idx media text'; }
.project.plain, .project.plain:nth-child(even) { grid-template-columns: clamp(3.5rem, 7vw, 6.5rem) minmax(0, 1fr); grid-template-areas: 'idx text'; }
.project .idx {
  grid-area: idx;
  position: sticky;
  top: 5rem;
  font: 900 clamp(2.4rem, 5.5vw, 4.75rem) / 0.85 var(--display);
  letter-spacing: -0.04em;
  color: transparent;
  -webkit-text-stroke: 1px var(--muted);
  font-variant-numeric: tabular-nums;
  transition: color 0.6s var(--ease-out), -webkit-text-stroke-color 0.6s var(--ease-out);
}
.project:hover .idx { color: var(--accent); -webkit-text-stroke-color: var(--accent); }
.project .text { grid-area: text; display: grid; gap: 0.9rem; align-content: start; min-width: 0; }
.project .tag { font: 500 0.72rem / 1.2 var(--mono); color: var(--signal); letter-spacing: 0.1em; text-transform: uppercase; }
.project h3 { font-family: var(--display); font-size: clamp(1.75rem, 3.4vw, 2.75rem); font-weight: 900; line-height: 1; letter-spacing: -0.025em; }
.project p { color: var(--soft); max-width: 36rem; }
.project .media { grid-area: media; min-width: 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.project .media img {
  width: 100%;
  aspect-ratio: 16 / 10.5;
  object-fit: cover;
  object-position: top;
  background: var(--chip);
  transform: scale(1.001);
  transition: transform 1.1s var(--ease-out);
}
.project:hover .media img { transform: scale(1.04); }
@media (max-width: 860px) {
  .project, .project:nth-child(even) { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'idx' 'media' 'text'; gap: 1.1rem; }
  .project.plain, .project.plain:nth-child(even) { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'idx' 'text'; }
  .project .idx { position: static; font-size: 2.4rem; }
}
.facts { height: 100%; margin: 0; display: grid; align-content: center; gap: 1rem; padding: 1.5rem; background: var(--accent-wash); }
.facts div { display: grid; gap: 0.15rem; }
.facts dt { font: 400 0.75rem / 1.3 var(--mono); color: var(--muted); }
.facts dd { margin: 0; font: 700 var(--step-2) / 1.2 var(--display); font-variant-numeric: tabular-nums; }

/* ---------- music and voice: rows with a player ---------- */
.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.row {
  display: grid;
  grid-template-columns: 2.9rem 3.2rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding-block: 1rem;
  border-bottom: 1px solid var(--line);
  transition: background-color 0.4s var(--ease-quart);
}
.row:hover, .row.active { background: color-mix(in srgb, var(--accent-wash) 55%, transparent); }
.row.nocover { grid-template-columns: 2.9rem minmax(0, 1fr) auto; }
.play {
  width: 2.9rem;
  height: 2.9rem;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
  flex: none;
  transition: background-color 0.3s var(--ease-quart), border-color 0.3s var(--ease-quart), color 0.3s var(--ease-quart), transform 0.5s var(--ease-out);
}
.play:hover, .active .play:not(.ghost) { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.play:hover:not(.ghost) { transform: scale(1.08); }
.play.ghost { cursor: default; color: var(--muted); font-size: var(--step--1); }
.play.ghost:hover { background: var(--surface); border-color: var(--line); color: var(--muted); }
.play svg { width: 14px; height: 14px; fill: currentColor; }
.row .cover { width: 3.2rem; height: 3.2rem; border-radius: 8px; object-fit: cover; background: var(--chip); }
.info { min-width: 0; display: grid; gap: 0.15rem; }
.info .title { font-weight: 600; overflow-wrap: anywhere; font-size: var(--step-1); }
.info .note { color: var(--muted); font-size: var(--step--1); overflow-wrap: anywhere; white-space: pre-line; }
.info .links { margin-top: 0.2rem; }
.time { font: 400 var(--step--1) / 1 var(--mono); color: var(--muted); font-variant-numeric: tabular-nums; direction: ltr; }
.seek { display: none; height: 4px; background: var(--chip); border-radius: 2px; cursor: pointer; position: relative; }
.seek.on { display: block; }
.seek i { position: absolute; inset-block: 0; inset-inline-start: 0; background: var(--accent); border-radius: 2px; width: 0; }
.row .seek { grid-column: 3 / -1; }
.row.nocover .seek { grid-column: 2 / -1; }

/* ---------- sketches and writing: cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr)); gap: clamp(1.25rem, 2.5vw, 2rem); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; min-width: 0; transition: transform 0.7s var(--ease-out), box-shadow 0.7s var(--ease-out), border-color 0.3s var(--ease-quart); }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.card-media { background: var(--chip); }
.card-media img, .card-media video, .card-media iframe { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; border: 0; background: #0a0a0a; }
.card-media img { background: var(--chip); }
.card-body { padding: 1.2rem 1.3rem 1.4rem; display: grid; gap: 0.6rem; align-content: start; }
.card-body h3 { font-family: var(--display); font-size: var(--step-2); font-weight: 700; line-height: 1.15; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.card-body p { color: var(--muted); font-size: var(--step--1); white-space: pre-line; overflow-wrap: anywhere; }
.card-audio { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 0.4rem 0.8rem; }
.card-audio .seek { grid-column: 1 / -1; }

/* ---------- about ---------- */
.about { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(2.5rem, 7vw, 6rem); }
@media (max-width: 820px) { .about { grid-template-columns: minmax(0, 1fr); } }
.about-text { display: grid; gap: 1.25rem; align-content: start; }
.about-text p { color: var(--soft); font-size: var(--step-1); line-height: 1.7; max-width: 38rem; }
.about-text p:first-child { font: 500 clamp(1.45rem, 2.7vw, 2.15rem) / 1.38 var(--display); color: var(--ink); letter-spacing: -0.01em; max-width: 34rem; }
.about-side { display: grid; gap: 2.75rem; align-content: start; }
.side-block h3 { font: 500 0.72rem / 1 var(--mono); color: var(--muted); letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 1.2rem; padding-bottom: 0.8rem; border-bottom: 1px solid var(--line); }
.timeline { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.5rem; position: relative; }
.timeline li { display: grid; gap: 0.15rem; padding-inline-start: 1.5rem; position: relative; }
.timeline li::before { content: ''; position: absolute; inset-inline-start: 0; top: 0.45rem; width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--accent); background: var(--bg); }
.timeline li:first-child::before { background: var(--accent); }
.timeline li:not(:last-child)::after { content: ''; position: absolute; inset-inline-start: 4px; top: 1.15rem; bottom: -1.5rem; width: 1px; background: var(--line); }
.timeline .when { font: 400 0.75rem / 1.5 var(--mono); color: var(--muted); }
.timeline strong { font-weight: 600; font-size: var(--step-1); }
.timeline .detail { color: var(--muted); font-size: var(--step--1); }

/* ---------- contact: a calm last word ---------- */
.contact { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.contact .write { flex-basis: 100%; font: 700 clamp(1.6rem, 3.4vw, 2.4rem) / 1.1 var(--display); letter-spacing: -0.015em; color: var(--soft); margin-bottom: 0.5rem; }
.contact .email.big {
  font: 500 clamp(1.1rem, 2.8vw, 1.9rem) / 1.25 var(--mono);
  direction: ltr;
  color: var(--ink);
  text-decoration: underline 1px var(--accent);
  text-underline-offset: 0.25em;
  overflow-wrap: anywhere;
  margin-bottom: 1.25rem;
}
.contact .email.big:hover { color: var(--accent); text-decoration-thickness: 2px; }
.contact > .email.big { flex-basis: 100%; }
[dir='rtl'] .contact .email.big { text-align: right; }

.foot { padding-block: 1.5rem 2.25rem; color: var(--muted); font-size: var(--step--1); border-top: 1px solid var(--line); }
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem; }

/* ---------- scroll: things arrive as they come into view (only with JS) ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(32px); transition: opacity 0.9s var(--ease-out), transform 1.1s var(--ease-out); }
.js [data-reveal].in { opacity: 1; transform: none; }
.js .project[data-reveal] .media { clip-path: inset(14% 0 0 0 round var(--radius)); transition: clip-path 1.3s var(--ease-out) 0.08s; }
.js .project[data-reveal].in .media { clip-path: inset(0 0 0 0 round var(--radius)); }
.js .head[data-reveal] h2 { transition-delay: 0.05s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .marquee .track { flex-wrap: wrap; width: auto; }
  .marquee .run + .run { display: none; }
  .marquee .run { flex-wrap: wrap; row-gap: 0.5rem; }
}

/* ---------- print: one clean document, no players or buttons ---------- */
@media print {
  @page { size: A4; margin: 13mm 14mm; }
  :root, :root[data-theme='dark'], :root:not([data-theme='light']) {
    --bg: #fff; --surface: #fff; --ink: #000; --soft: #222; --muted: #444; --line: #c9c9c9;
    --accent: #0b5e53; --accent-wash: #fff; --chip: #f1f1f1; --signal: #8a3412; --shadow: none;
    color-scheme: light;
  }
  html { scroll-padding-top: 0; }
  body { font-size: 9.6pt; line-height: 1.45; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  [data-reveal], .js [data-reveal], .js .project[data-reveal] .media { opacity: 1 !important; transform: none !important; clip-path: none !important; }
  .wrap { max-width: none; padding-inline: 0; }
  .bar, .skip, .actions, .play, .seek, .time, .card-media, .card-audio, [data-copy], audio, video, iframe, .arrow, .pulse, .hero::before, .marquee, .stats, .kicker, .idx, .write, .hero h1::after { display: none !important; }
  .hero { padding-block: 0 10pt; }
  .hero h1 { font-size: 28pt; line-height: 1; margin-block: 6pt; padding-bottom: 6pt; letter-spacing: -0.01em; }
  .hero-grid { grid-template-columns: minmax(0, 1fr) 15.5rem; gap: 14pt; align-items: start; }
  .roles { font-size: 12.5pt; }
  .lede { font-size: 10.5pt; }
  .avail { background: none; padding: 0; border: 0; }
  .reach { border: 1px solid var(--line); padding: 8pt 10pt; gap: 4pt; break-inside: avoid; }
  .reach li a { padding-block: 3pt; }
  section.block { padding-block: 9pt; border-top: 1px solid var(--line); }
  .head h2 { font-size: 15pt; letter-spacing: 0; }
  .head + *, .intro + * { margin-top: 8pt; }
  .head + .intro { margin-top: 3pt; }
  .project, .project:nth-child(even), .project.plain { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'text'; padding: 7pt 0; break-inside: avoid; }
  .project .media { display: none; }
  .project h3 { font-size: 12.5pt; }
  .project .text { gap: 3pt; }
  .project p { max-width: none; }
  .chips li { font-size: 7.5pt; padding: 0 4pt; }
  a { color: inherit; text-decoration: none; }
  .links { font-size: 8.5pt; gap: 2pt 10pt; }
  .links a { background: none; }
  .links a[data-url]::after, .contact a.btn[data-url]::after { content: ' · ' attr(data-url); font-family: var(--mono); font-weight: 400; color: var(--muted); }
  .row, .row.nocover { grid-template-columns: minmax(0, 1fr); padding-block: 4pt; break-inside: avoid; }
  .row .cover { display: none; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6pt; }
  .card { border: 1px solid var(--line); break-inside: avoid; }
  .card-body { padding: 6pt 8pt; gap: 3pt; }
  .about { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16pt; }
  .about-text p, .about-text p:first-child { font: 400 10pt / 1.5 var(--body); color: var(--soft); }
  .about-side { gap: 10pt; }
  .intro, .timeline strong { font-size: 10pt; }
  .about-text p:first-child { max-width: none; }
  .timeline { gap: 5pt; }
  .timeline li:not(:last-child)::after { bottom: -5pt; }
  .block-contact { break-inside: avoid; }
  .contact .btn { border: 0; padding: 0; min-height: 0; margin-inline-end: 12pt; }
  .contact .email.big { font-size: 12pt; color: inherit; background: none; margin-bottom: 4pt; }
  .foot { display: none; }
}

/* English titles on a Hebrew page still line up on the right. */
[dir='rtl'] :is(h1, h2, h3, h4, .title, .who)[dir='auto'] { text-align: right; }

/* Hebrew letters are never spaced apart, even in the mono labels. */
:lang(he) :is(.kicker, .reach .label, .stats span, .side-block h3, .bar nav a, .project .tag, .head .num) { letter-spacing: 0; }
/* A monospace space is too wide between Hebrew words, so Hebrew labels use the sans. */
:lang(he) :is(.kicker, .avail, .reach .label, .stats span, .side-block h3, .bar nav a, .project .tag, .timeline .when, .tool, .head .count) { font-family: var(--body); }

/* Taps: only what can be tapped reacts; headings and buttons never start a
   text selection (the text itself stays selectable, to copy an address). */
html { -webkit-tap-highlight-color: transparent; }
button, a, nav, summary, h1, h2, h3, .chips, .tag { -webkit-user-select: none; user-select: none; }
