/* Layout: sticky glass profile rail + content column of glass panels over a faceted background.
   Theme: light tokens on :root; dark via prefers-color-scheme (when no explicit choice) or data-theme="dark". */
:root {
  --bg: #e9eef5;
  --bg-image: url("bg-light.jpg");
  --veil: linear-gradient(180deg, rgba(233, 238, 245, .25), rgba(233, 238, 245, .7));
  --glow: rgba(29, 95, 214, .14);
  --text: #0d1726;
  --body-text: #26344a;
  --muted: #4d5d74;
  --faint: #7a879a;
  --accent: #1d5fd6;
  --accent-2: #1a56c4;
  --accent-ink: #ffffff;
  --accent-soft: rgba(29, 95, 214, .08);
  --accent-line: rgba(29, 95, 214, .22);
  --glass: rgba(255, 255, 255, .6);
  --glass-strong: rgba(255, 255, 255, .74);
  --glass-line: rgba(20, 50, 100, .1);
  --glass-hi: rgba(255, 255, 255, .8);
  --chip: rgba(20, 50, 100, .05);
  --shadow: 0 24px 60px -28px rgba(20, 40, 80, .35);
  --dot-bg: #ffffff;
  --font-display: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
  --font-body: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
  --radius: 22px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #070b13;
    --bg-image: url("bg-dark.jpg");
    --veil: linear-gradient(180deg, rgba(6, 9, 16, .3), rgba(6, 9, 16, .78));
    --glow: rgba(77, 155, 255, .2);
    --text: #e8eef7;
    --body-text: #cfd8e5;
    --muted: #97a6ba;
    --faint: #66748a;
    --accent: #4d9bff;
    --accent-2: #8cc4ff;
    --accent-ink: #04101f;
    --accent-soft: rgba(77, 155, 255, .12);
    --accent-line: rgba(77, 155, 255, .28);
    --glass: rgba(14, 20, 32, .58);
    --glass-strong: rgba(12, 17, 28, .74);
    --glass-line: rgba(160, 190, 255, .1);
    --glass-hi: rgba(255, 255, 255, .06);
    --chip: rgba(140, 180, 255, .07);
    --shadow: 0 24px 60px -24px rgba(0, 0, 0, .75);
    --dot-bg: #0b1220;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #070b13;
  --bg-image: url("bg-dark.jpg");
  --veil: linear-gradient(180deg, rgba(6, 9, 16, .3), rgba(6, 9, 16, .78));
  --glow: rgba(77, 155, 255, .2);
  --text: #e8eef7;
  --body-text: #cfd8e5;
  --muted: #97a6ba;
  --faint: #66748a;
  --accent: #4d9bff;
  --accent-2: #8cc4ff;
  --accent-ink: #04101f;
  --accent-soft: rgba(77, 155, 255, .12);
  --accent-line: rgba(77, 155, 255, .28);
  --glass: rgba(14, 20, 32, .58);
  --glass-strong: rgba(12, 17, 28, .74);
  --glass-line: rgba(160, 190, 255, .1);
  --glass-hi: rgba(255, 255, 255, .06);
  --chip: rgba(140, 180, 255, .07);
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, .75);
  --dot-bg: #0b1220;
  color-scheme: dark;
}
:root[lang="he"] { --font-display: "Heebo", "Segoe UI", system-ui, sans-serif; --font-body: "Heebo", "Segoe UI", system-ui, sans-serif; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 24px; }
body {
  margin: 0;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  background-color: var(--bg);
  background-image: radial-gradient(1200px 700px at 85% 0%, var(--glow), transparent 60%), var(--veil), var(--bg-image);
  background-size: auto, auto, cover;
  background-attachment: fixed;
  background-position: center;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-2); text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3 { margin: 0; line-height: 1.25; text-wrap: balance; font-family: var(--font-display); }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
.ico { width: 18px; height: 18px; flex: none; }
.skip { position: absolute; inset-inline-start: -999px; }
.skip:focus { inset-inline-start: 16px; top: 16px; background: var(--glass-strong); color: var(--text); padding: 8px 12px; z-index: 10; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }

.glass {
  background: var(--glass);
  border: 1px solid var(--glass-line);
  border-radius: var(--radius);
  box-shadow: inset 0 1px 0 var(--glass-hi), var(--shadow);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  backdrop-filter: blur(22px) saturate(140%);
}

/* Layout */
.shell {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 28px;
  max-width: 1240px;
  margin-inline: auto;
  padding-block: 32px 48px;
  padding-left: max(28px, env(safe-area-inset-left, 0px));
  padding-right: max(28px, env(safe-area-inset-right, 0px));
}

/* Sidebar */
.side {
  position: sticky; top: 32px; align-self: start;
  padding: 28px 22px;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  background: var(--glass-strong);
}
.avatar-ring {
  padding: 4px; border-radius: 50%;
  background: conic-gradient(from 200deg, var(--accent), var(--accent-2), var(--glass-line), var(--accent));
  box-shadow: 0 0 40px -6px var(--glow);
}
.avatar { display: block; width: 132px; height: 132px; border-radius: 50%; object-fit: cover; border: 3px solid var(--dot-bg); }
.side h1 { margin-top: 18px; font-size: 1.6rem; font-weight: 800; letter-spacing: -.01em; }
.role { color: var(--accent); font-weight: 600; margin-top: 2px; }
.loc { display: inline-flex; gap: 6px; align-items: center; color: var(--muted); font-size: .9rem; margin-top: 4px; }
.loc .ico { width: 15px; height: 15px; }

.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 44px; margin-top: 10px; padding: 10px 16px;
  border-radius: 14px; font-weight: 600; font-size: .95rem;
  transition: transform .15s, background .15s, box-shadow .15s;
}
.btn:hover { text-decoration: none; }
.btn.primary { margin-top: 22px; color: var(--accent-ink); background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 10px 28px -12px var(--accent); }
.btn.primary:hover { color: var(--accent-ink); transform: translateY(-1px); }
.dl { width: 100%; }
.dl > summary { list-style: none; cursor: pointer; user-select: none; }
.dl > summary::-webkit-details-marker { display: none; }
.dl-caret { width: 8px; height: 8px; margin-inline-start: 2px; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-2px) rotate(45deg); transition: transform .15s; }
.dl[open] .dl-caret { transform: translateY(2px) rotate(-135deg); }
.dl-menu { display: grid; gap: 6px; margin-top: 8px; padding: 6px; border-radius: 14px; background: var(--chip); border: 1px solid var(--glass-line); }
.dl-menu a { display: grid; gap: 1px; padding: 9px 12px; border-radius: 10px; color: var(--text); text-align: start; }
.dl-menu a:hover { text-decoration: none; background: var(--accent-soft); }
.dl-menu strong { font-size: .92rem; font-weight: 700; }
.dl-menu span { font-size: .78rem; color: var(--muted); }
.btn.ghost { color: var(--text); background: var(--chip); border: 1px solid var(--glass-line); }
.btn.ghost:hover { color: var(--text); background: var(--accent-soft); }

.theme { width: 100%; margin-top: 14px; }
.theme-label { display: block; font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); margin-bottom: 6px; }
:root[lang="he"] .theme-label { letter-spacing: 0; font-size: .82rem; }
.seg { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px; padding: 4px; border-radius: 14px; background: var(--chip); border: 1px solid var(--glass-line); }
.seg button {
  font: inherit; font-size: .85rem; font-weight: 600; color: var(--muted);
  padding: 7px 4px; border: 0; border-radius: 10px; background: transparent; cursor: pointer;
}
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"] { color: var(--accent-ink); background: linear-gradient(135deg, var(--accent), var(--accent-2)); }

.contact { width: 100%; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--glass-line); display: grid; gap: 4px; }
.contact a, .toc a {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px;
  color: var(--muted); font-size: .92rem; text-align: start; overflow-wrap: anywhere;
}
.contact a:hover, .toc a:hover { color: var(--text); background: var(--chip); text-decoration: none; }
.contact .ico, .toc .ico { color: var(--accent); }
.toc { width: 100%; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--glass-line); display: grid; gap: 2px; }

/* Main column */
.content { display: grid; gap: 28px; min-width: 0; }
.card { padding: 24px 26px; }
.sec {
  display: flex; align-items: center; gap: 10px;
  font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent);
}
:root[lang="he"] .sec { font-size: 1rem; letter-spacing: 0; }
.sec.out { margin: 0 6px 14px; }
.sec .ico { width: 17px; height: 17px; }

/* Hero */
.hero { padding: 34px 34px 30px; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset-inline-end: -120px; top: -140px; width: 380px; height: 380px; border-radius: 50%;
  background: radial-gradient(circle, var(--glow), transparent 65%); pointer-events: none;
}
.eyebrow { color: var(--accent); font-weight: 700; font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; }
:root[lang="he"] .eyebrow { letter-spacing: 0; }
.tagline { margin-top: 10px; font-family: var(--font-display); font-size: clamp(1.25rem, 2.2vw, 1.6rem); font-weight: 700; line-height: 1.4; max-width: 46ch; letter-spacing: -.005em; }
.hero .sec { margin: 24px 0 10px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 24px; }
.stats li { display: flex; }
.stats li > *, .stats li { min-width: 0; }
.stats li > a, .stats li:not(:has(a)) { flex: 1; display: block; background: var(--chip); border: 1px solid var(--glass-line); border-radius: 16px; padding: 14px 14px 12px; color: var(--text); }
.stats li > a { transition: border-color .18s, transform .18s; }
.stats li > a:hover { text-decoration: none; border-color: var(--accent-line); transform: translateY(-2px); }
.stats strong { display: block; font-family: var(--font-display); font-size: 1.7rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--accent); text-align: start; }
:root[dir="rtl"] .stats strong { text-align: right; }
.stats span { display: block; margin-top: 6px; color: var(--muted); font-size: .82rem; line-height: 1.45; }
.para { color: var(--body-text); margin-top: 12px; max-width: 80ch; }

/* Skills */
.skills { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.skill h3 { display: flex; align-items: center; gap: 12px; font-size: 1.05rem; margin-bottom: 12px; }
.badge {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; flex: none;
  color: var(--accent); background: var(--accent-soft); border: 1px solid var(--accent-line);
}
.list li { position: relative; padding-inline-start: 18px; margin-top: 7px; color: var(--body-text); font-size: .95rem; }
.list li::before {
  content: ""; position: absolute; inset-inline-start: 2px; top: .62em; width: 6px; height: 6px; border-radius: 2px;
  background: var(--accent); transform: rotate(45deg);
}
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pills li { padding: 6px 12px; border-radius: 999px; background: var(--chip); border: 1px solid var(--glass-line); font-size: .88rem; color: var(--body-text); }

/* Experience */
.timeline { display: grid; gap: 18px; position: relative; padding-inline-start: 26px; }
.timeline::before { content: ""; position: absolute; inset-inline-start: 7px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--accent), transparent); }
.job { position: relative; }
.job::before {
  content: ""; position: absolute; inset-inline-start: -26px; top: 30px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--dot-bg); border: 3px solid var(--accent); box-shadow: 0 0 14px var(--glow);
}
.job-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.job h3 { font-size: 1.2rem; font-weight: 700; }
.org { color: var(--accent); font-weight: 600; margin-top: 3px; }
.via { color: var(--muted); font-weight: 500; }
.dates {
  flex: none; white-space: nowrap; font-size: .82rem; font-weight: 600; color: var(--text);
  padding: 4px 12px; border-radius: 999px; background: var(--chip); border: 1px solid var(--glass-line);
  font-variant-numeric: tabular-nums;
}
.intro { margin-top: 12px; color: var(--muted); font-style: italic; }
:root[lang="he"] .intro { font-style: normal; }
.job .list { margin-top: 8px; }

/* Projects */
.sec-intro { color: var(--muted); margin: -6px 6px 6px; max-width: 70ch; }
.group-title { font-size: 1rem; font-weight: 700; margin: 18px 6px 12px; color: var(--text); display: flex; align-items: center; gap: 10px; }
.group-title::after { content: ""; flex: 1; height: 1px; background: var(--glass-line); }
.projects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.projects > :last-child:nth-child(odd) { grid-column: 1 / -1; }
a.project { display: flex; flex-direction: column; gap: 10px; color: var(--text); transition: transform .18s, border-color .18s; }
a.project:hover { text-decoration: none; color: var(--text); transform: translateY(-2px); border-color: var(--accent-line); }
.project-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.project-name { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; line-height: 1.35; }
.project-sum { color: var(--body-text); font-size: .93rem; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags > * { font-size: .76rem; padding: 3px 10px; border-radius: 999px; color: var(--accent); background: var(--accent-soft); border: 1px solid var(--accent-line); }
.more { margin-top: auto; padding-top: 4px; color: var(--accent); font-weight: 600; font-size: .9rem; }
.arrow { display: inline-block; transition: transform .18s; }
a.project:hover .arrow { transform: translateX(3px); }
:root[dir="rtl"] .arrow { transform: scaleX(-1); }
:root[dir="rtl"] a.project:hover .arrow { transform: scaleX(-1) translateX(3px); }

/* Project detail views: shown when targeted by #p-slug; the rest of the page hides */
.page-main { display: grid; gap: 28px; min-width: 0; }
.view { display: none; }
.view:target { display: grid; gap: 18px; min-width: 0; }
.content:has(.view:target) .page-main { display: none; }
.back { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; justify-self: start; padding: 8px 14px; border-radius: 12px; background: var(--glass-strong); border: 1px solid var(--glass-line); color: var(--text); }
.back:hover { text-decoration: none; border-color: var(--accent-line); }
.detail-head { padding: 30px 32px; display: grid; gap: 12px; }
.detail-head h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; letter-spacing: -.01em; }
.detail-sum { font-size: 1.08rem; color: var(--body-text); max-width: 70ch; }
.repo-note { color: var(--muted); font-size: .88rem; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.detail-grid .wide { grid-column: 1 / -1; }
.detail-grid .sec { margin-bottom: 10px; }
.flow { counter-reset: step; display: grid; gap: 0; }
.flow li { counter-increment: step; position: relative; padding: 8px 0 8px 40px; padding-inline: 40px 0; color: var(--body-text); font-size: .95rem; }
.flow li::before {
  content: counter(step); position: absolute; inset-inline-start: 0; top: 6px; width: 26px; height: 26px; border-radius: 8px;
  display: grid; place-items: center; font-size: .75rem; font-weight: 700; color: var(--accent); background: var(--accent-soft); border: 1px solid var(--accent-line);
}
.flow li:not(:last-child)::after { content: ""; position: absolute; inset-inline-start: 12px; top: 34px; bottom: -4px; width: 2px; background: var(--accent-line); }
.results li::before { background: #2fbf71; border-radius: 50%; transform: none; }

.projects.featured { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.projects.featured > :last-child:nth-child(odd) { grid-column: auto; }
.project-org { color: var(--accent); font-size: .82rem; font-weight: 600; margin-top: -4px; }
.portfolio-cta { width: auto; justify-self: start; display: inline-flex; margin-top: 18px; padding-inline: 22px; }
#projects { display: grid; }
#portfolio .group-title { margin-top: 10px; }
#portfolio .project-org { display: none; }
.detail-role { color: var(--body-text); font-size: .95rem; }
.detail-role strong { color: var(--accent); font-weight: 700; }
.stack-table { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; margin: 0; }
.stack-table div { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; background: var(--chip); border: 1px solid var(--glass-line); min-width: 0; }
.stack-table dt { font-weight: 700; font-size: .9rem; color: var(--text); text-align: start; }
.stack-table dd { margin: 0; color: var(--muted); font-size: .88rem; }

/* Credentials */
.creds { display: grid; grid-template-columns: 1.15fr 1.15fr .8fr; gap: 18px; }
.creds .sec { margin-bottom: 8px; }
.rows li { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--glass-line); font-size: .93rem; }
.rows li:last-child { border-bottom: 0; }
.rows small { display: block; color: var(--muted); font-size: .8rem; margin-top: 3px; }
.rows .dates { padding: 2px 10px; font-size: .78rem; }

.foot { color: var(--faint); font-size: .85rem; text-align: center; padding-top: 4px; }

/* Entrance: slides from a visible resting state */
@media (prefers-reduced-motion: no-preference) {
  .glass { animation: rise .6s cubic-bezier(.2, .7, .2, 1) both; }
  @keyframes rise { from { transform: translateY(12px); } to { transform: none; } }
}

@media (max-width: 1100px) {
  .projects.featured { grid-template-columns: 1fr; }
  .creds { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; padding-block: 16px 40px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); gap: 20px; }
  .side { position: static; }
  .toc { display: none; }
  .skills, .projects, .projects.featured, .creds, .detail-grid, .stack-table { grid-template-columns: 1fr; }
  body { background-attachment: scroll; }
}
@media (max-width: 560px) {
  .hero { padding: 24px 18px; }
  .card { padding: 20px 16px; }
  .job-head { flex-direction: column; gap: 8px; }
  .timeline { padding-inline-start: 20px; }
  .job::before { inset-inline-start: -20px; width: 13px; height: 13px; }
  .timeline::before { inset-inline-start: 5px; }
}

/* Print / PDF: clean light layout regardless of the chosen theme */
@media print {
  @page { size: A4; margin: 13mm 13mm 15mm; }
  :root, :root[data-theme] {
    --text: #111a26; --body-text: #1d2836; --muted: #4f5d70; --faint: #777; --accent: #1a56c4; --accent-2: #1a56c4;
    --glass-line: #e1e5ec; --chip: #f3f6fa; --accent-soft: transparent; --accent-line: #c9d6ee;
    background: #fff; color-scheme: light;
  }
  body { background: #fff; font-size: 9.3pt; line-height: 1.42; color: var(--text); }
  .glass, .hero { background: none; border: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; animation: none; border-radius: 0; overflow: visible; }
  .shell { display: block; padding: 0; max-width: none; }
  .side { position: static; display: grid; grid-template-columns: 76px 1fr; column-gap: 16px; text-align: start; align-items: center; padding: 0 0 10px; border-bottom: 2px solid var(--accent); }
  .avatar-ring { grid-row: 1 / 5; background: none; box-shadow: none; padding: 0; }
  .avatar { width: 76px; height: 76px; border: 0; }
  .side h1 { margin: 0; font-size: 20pt; }
  .btn, .dl, .theme, .toc, .skip, .foot, .hero::before, .view, .more, .sec-intro, .portfolio-cta { display: none !important; }
  .content:has(.view:target) .page-main { display: block; }
  .page-main { display: block; }
  .page-main > * { margin-top: 12px; }
  .group-title { margin: 8px 0 4px; font-size: 10pt; }
  .group-title::after { display: none; }
  a.project { gap: 2px; break-inside: avoid; }
  .project-name { font-size: 9.8pt; }
  .project-sum { font-size: 9pt; color: var(--text); }
  .contact { display: flex; flex-wrap: wrap; gap: 0 14px; border: 0; margin: 4px 0 0; padding: 0; }
  .contact a { padding: 0; color: var(--text); font-size: 8.8pt; }
  .content { display: block; }
  .content > * { margin-top: 12px; }
  .hero { padding: 0; }
  .tagline { font-size: 11pt; max-width: none; margin-top: 2px; }
  .eyebrow { display: none; }
  .para { margin-top: 5px; max-width: none; }
  .stats { gap: 6px; margin-top: 8px; }
  .stats li > a, .stats li:not(:has(a)) { padding: 6px 8px; border-radius: 8px; }
  .stats strong { font-size: 13pt; }
  .stats span { font-size: 7.6pt; margin-top: 2px; }
  .card { padding: 0; }
  .sec.out { margin: 0 0 6px; }
  .skills { grid-template-columns: 1fr 1fr; gap: 8px 18px; }
  .skill h3 { font-size: 10pt; margin-bottom: 2px; }
  .badge { display: none; }
  .list li { margin-top: 2px; font-size: 9pt; }
  .pills li { padding: 1px 8px; font-size: 8.4pt; }
  .timeline { padding: 0; gap: 10px; }
  .timeline::before, .job::before { display: none; }
  .job h3 { font-size: 10.5pt; }
  .dates { padding: 0; border: 0; background: none; color: var(--muted); font-size: 8.6pt; }
  .intro { margin-top: 3px; }
  .projects { grid-template-columns: 1fr 1fr; gap: 8px 18px; }
  .creds { grid-template-columns: 1fr 1fr; gap: 8px 18px; }
  .creds > :last-child { grid-column: 1 / -1; }
  .creds > :last-child .rows { display: flex; gap: 32px; }
  .creds > :last-child .rows li { border: 0; gap: 10px; }
  .tags > * { background: none; padding: 0 6px; font-size: 8pt; }
  .rows li { padding: 4px 0; font-size: 8.8pt; }
  .skill, .project, .rows li, .list li, .job-head { break-inside: avoid; }
  .job-head { break-after: avoid; }
  a { color: inherit; }

  /* Full CV PDF is capped at two pages: the site keeps everything, print keeps the core. */
  #projects, .stats, .attrs, .tagline, .para.p2, .para.p3 { display: none !important; }
  .skills { display: block; column-count: 3; column-gap: 14px; }
  .skills > .skill { margin-bottom: 7px; }
  .skill .list li { font-size: 8.4pt; line-height: 1.32; margin-top: 1px; }
  #credentials .rows small { display: none; }
  .job .intro { display: none; }
  .job .list li { font-size: 8.8pt; }
  .creds { grid-template-columns: 1.25fr 1.25fr .8fr; gap: 6px 16px; }
  .creds > :last-child { grid-column: auto; }
  .creds > :last-child .rows { display: block; }
  .creds .rows li { padding: 2px 0; }
  .timeline { display: block; }
  .timeline > .job + .job { margin-top: 9px; }
  /* Hebrew sets tighter, so it keeps one more bullet in the two current roles. */
  :root:not([lang="he"]) .timeline > .job:nth-child(-n+2) .list li:nth-child(n+7),
  :root[lang="he"] .timeline > .job:nth-child(-n+2) .list li:nth-child(n+8),
  .timeline > .job:nth-child(n+4) .list li:nth-child(n+4) { display: none; }
}
