/* Tokens and components from WIX/Design/CV-Site-Design-System.md (v2). Shared by all pages. */

/* Fonts: fonts.css (made by _src/make_fonts_css.py), linked by every page before this file. */

:root {
  --primary: #00d992; --primary-soft: #2fd6a1; --primary-deep: #10b981; --on-primary: #101010;
  --ink: #f2f2f2; --ink-strong: #ffffff; --body: #bdbdbd; --mute: #8b949e;
  --hairline: #3d3a39; --canvas: #101010; --canvas-soft: #1a1a1a;
  --dash: rgba(79, 93, 117, 0.4); --logo-tile: #f2f2f2; --error: #ff8a80;
  --sans: Inter, "Inter Fallback", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", "Courier New", monospace;     /* Courier New has JetBrains Mono's width (measured 1.000) */
  --container: 1100px; --gutter: 32px; --section: 96px;
}
@media (max-width: 767px) { :root { --gutter: 16px; --section: 64px; } }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--canvas); color: var(--ink); font: 400 16px/26px var(--sans); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--primary-soft); text-decoration: none; }
a:hover { text-decoration: underline; }
/* links inside running text (About, page intros, bullets, results): always underlined with a thin muted line that
   lights up on hover, so a link is not told by colour alone (Ilya 2026-11-06). Cards, menus and buttons are not text links. */
.about a, .card.intro a, ul.did a, .result a, .edu .docs a, .contact-list a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px;
  text-decoration-color: rgba(47, 214, 161, .4); }
.about a:hover, .card.intro a:hover, ul.did a:hover, .result a:hover, .edu .docs a:hover, .contact-list a:hover { text-decoration-color: var(--primary); }
.edu .docs a { font-weight: inherit; }   /* thesis PDF links: plain text links like the others, not bold (Ilya 2026-11-06) */
/* card links (home project and tool cards, company-page cards): a green arrow after the title slides in on hover, the same
   4 px move as the Career cards (Ilya 2026-11-06). Zero width, so it never changes the title's line breaks or the card height. */
a.pcard h3::after, a.tool.link h3::after, a.cocard .cbody h3::after {
  content: "\2192" / ""; display: inline-block; width: 0; margin-inline-start: .35em; white-space: nowrap; color: var(--primary);
  font-size: .8em;   /* smaller than the title, so it does not weigh on the big cards (Ilya 2026-11-06) */
  /* raised to the middle of the letters, by transform so the line height stays (Ilya 2026-11-06). Measured in Inter: the
     arrow's ink centre is .25 of its size above the baseline; Latin capitals centre .365 of the title size (= the line
     centre), Hebrew letters (Heebo) .30. Shift = (.365 - .8 * .25) / .8 = .206em, Hebrew (.30 - .2) / .8 = .125em.
     A title ending in a lowercase x-height letter gets --ay from JS_ARROW in build.py */
  opacity: 0; transform: translate(-4px, var(--ay, -.206em)); transition: opacity .2s, transform .2s; }
[dir="rtl"] a.pcard h3::after, [dir="rtl"] a.tool.link h3::after, [dir="rtl"] a.cocard .cbody h3::after { content: "\2190" / ""; transform: translate(4px, var(--ay, -.125em)); }
/* back buttons (header and page bottom) and the Previous / Next project cards: the arrow moves its way on hover */
/* --by raises the arrow to the middle of the letter next to it (Ilya 2026-11-06), share of the text size above the
   baseline measured in Inter / Heebo: arrow middle .25 at 600 (buttons), .275 at 400 (Previous / Next); capitals .365,
   t .335, Hebrew letters .29. English: ← Career / BIRD / All / Back (capital), ← Previous (P), Next project → (t) */
.back .arr, .pnav .arr { display: inline-block; transition: transform .2s; transform: translateY(var(--by)); }
.back .arr { --by: -.115em; }
.pnav a:not(.next) .arr { --by: -.09em; }
.pnav .next .arr { --by: -.06em; }
[dir="rtl"] .back .arr { --by: -.04em; }
[dir="rtl"] .pnav a:not(.next) .arr, [dir="rtl"] .pnav a.next .arr { --by: -.015em; }   /* as specific as the English rules, or they win */
.back .arr, .pnav a:not(.next) .arr { margin-inline-end: .3em; }
.pnav .next .arr { margin-inline-start: .3em; }
@media (hover: hover) {
  a.pcard:hover h3::after, a.tool.link:hover h3::after, a.cocard:hover .cbody h3::after { opacity: 1; transform: translate(4px, var(--ay, -.206em)); }
  [dir="rtl"] a.pcard:hover h3::after, [dir="rtl"] a.tool.link:hover h3::after, [dir="rtl"] a.cocard:hover .cbody h3::after { transform: translate(-4px, var(--ay, -.125em)); }
  .back:hover .arr, .pnav a:not(.next):hover .arr { transform: translate(-4px, var(--by)); }
  [dir="rtl"] .back:hover .arr, [dir="rtl"] .pnav a:not(.next):hover .arr, .pnav .next:hover .arr { transform: translate(4px, var(--by)); }
  [dir="rtl"] .pnav .next:hover .arr { transform: translate(-4px, var(--by)); }
}
@media (prefers-reduced-motion: reduce) {
  a.pcard h3::after, a.tool.link h3::after, a.cocard .cbody h3::after, .back .arr, .pnav .arr { transition: none; }
}
:focus-visible { outline: 2px solid var(--primary-soft); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { margin: 0; font-weight: 500; color: var(--ink-strong); }
p { margin: 0; }
ul { margin: 0; padding: 0; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--section) 0; }
.section + .section { border-top: 1px dashed var(--dash); }

/* type */
.eyebrow { font-size: 13px; line-height: 20px; font-weight: 600; letter-spacing: 2.4px; text-transform: uppercase; color: var(--mute); }
.display-xl { font-size: 56px; line-height: 60px; letter-spacing: -0.65px; }
.display-lg { font-size: 36px; line-height: 42px; letter-spacing: -0.9px; }
.display-md { font-size: 24px; line-height: 32px; font-weight: 600; letter-spacing: -0.4px; }
.body-lg { font-size: 18px; line-height: 28px; color: var(--body); }
.body-sm { font-size: 14px; line-height: 20px; }
.mono { font-family: var(--mono); font-size: 13px; line-height: 18px; }
.mute { color: var(--mute); }
.body { color: var(--body); }
@media (max-width: 767px) {
  .display-xl { font-size: 34px; line-height: 40px; }
  .display-lg { font-size: 26px; line-height: 32px; }
}
.section-head { margin-bottom: 32px; }
.section-head .eyebrow { margin-bottom: 8px; }

/* placeholders: visible on purpose, never published */
.tbd { font-family: var(--mono); font-size: 0.82em; color: var(--mute); border: 1px dashed var(--hairline); border-radius: 4px; padding: 0 4px; overflow-wrap: anywhere; }

/* grid and flex children may shrink below their content width (no horizontal scroll on phones) */
.stats > *, .grid-3 > *, .positions > *, .position > *, .contact > *, .skill-group > *, .edu > *, .form > * { min-width: 0; }

/* buttons */
.btns { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 24px;
       font: 600 16px/24px var(--sans); border-radius: 6px; border: 1px solid var(--hairline); color: var(--ink); background: var(--canvas); }
.btn { cursor: pointer; transition: background-color .15s, border-color .15s, box-shadow .15s, transform .15s; }
.btn:hover { text-decoration: none; border-color: var(--primary); }
.btn-primary { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
/* stronger hover on the main buttons (Ilya 2026-10-30): lighter fill, accent ring and glow, lifted 1 px; pressed = down */
.btn-primary:hover, .btn-primary:focus-visible { background: #3ae6ac; border-color: #3ae6ac;
  box-shadow: 0 0 0 3px rgba(0, 217, 146, .28), 0 6px 20px rgba(0, 217, 146, .38); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); box-shadow: 0 0 0 2px rgba(0, 217, 146, .35); }
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } .btn-primary:hover, .btn-primary:active { transform: none; } }
.link-ghost { font-weight: 600; }

/* tags */
.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; }
.tag { font-family: var(--mono); font-size: 13px; line-height: 18px; color: var(--ink); border: 1px solid var(--hairline); border-radius: 9999px; padding: 4px 12px; }

/* stat tiles */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat { background: var(--canvas-soft); border-radius: 8px; padding: 24px; }
.stat .num { font-family: var(--mono); font-size: 40px; line-height: 44px; font-weight: 500; color: var(--ink-strong); }
.stat .num .tbd { font-size: 22px; }
.stat .label { font-size: 14px; line-height: 20px; color: var(--mute); margin-top: 8px; }
@media (max-width: 1023px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* logo tile: every logo sits on the same light plate so dark marks stay readable */
.logo { display: grid; place-items: center; background: var(--logo-tile); border-radius: 6px; padding: 6px; flex: none; }
.logo img { max-height: 100%; width: auto; object-fit: contain; }
.logo-40 { width: 72px; height: 40px; }
.logo-56 { width: 56px; height: 56px; }
.logo-chip { height: 28px; padding: 4px 8px; }
.logo-chip img { height: 20px; }

/* position card */
.position { border: 1px solid var(--hairline); border-radius: 8px; padding: 24px; display: grid; grid-template-columns: 72px 1fr; gap: 20px; }
.position .meta { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 4px 0 12px; }
.position .company { color: var(--ink); }
.position ul.results { list-style: disc; padding-left: 20px; color: var(--body); margin-bottom: 16px; }
.position ul.results li + li { margin-top: 4px; }
.position ul.results li::marker { color: var(--mute); }
.position .via { display: flex; align-items: center; gap: 8px; margin: -4px 0 12px; }
.position .proj-links { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 16px; font-size: 14px; line-height: 20px; }
.positions { display: grid; gap: 16px; }
@media (max-width: 767px) { .position { grid-template-columns: 1fr; } }

/* project card: whole card is the link */
.project { display: flex; flex-direction: column; gap: 8px; border: 1px solid var(--hairline); border-radius: 8px; padding: 24px; color: var(--ink); background: var(--canvas); }
.project:hover { text-decoration: none; border-color: var(--primary); }
.project .co { font-size: 14px; line-height: 20px; color: var(--mute); }
.project h3 { font-size: 24px; line-height: 32px; font-weight: 600; letter-spacing: -0.4px; }
.project .platform { color: var(--body); }
.project .role { font-size: 14px; line-height: 20px; color: var(--body); }
.project .metric { font-family: var(--mono); color: var(--ink-strong); margin-top: auto; padding-top: 8px; }
.project .tags { margin-top: 8px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 1023px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 767px) { .grid-3 { grid-template-columns: 1fr; } }

/* automation tool card */
.tool { border: 1px solid var(--hairline); border-radius: 8px; padding: 24px; display: flex; flex-direction: column; gap: 8px; }
.tool .stack { font-family: var(--mono); font-size: 13px; color: var(--mute); }
.tool .metric { font-family: var(--mono); color: var(--ink-strong); margin-top: auto; padding-top: 8px; }

/* skills */
.skill-groups { display: grid; gap: 24px; }
.skill-group { display: grid; grid-template-columns: 200px 1fr; gap: 16px; align-items: start; }
.skill-group h3 { font-size: 16px; line-height: 30px; font-weight: 600; color: var(--ink); }
@media (max-width: 767px) { .skill-group { grid-template-columns: 1fr; gap: 8px; } }
.tool-logos { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; list-style: none; }
.tool-logos .logo { height: 40px; padding: 6px 10px; }
.tool-logos .logo img { height: 28px; }

/* education */
.edu { display: grid; grid-template-columns: 56px 1fr; gap: 16px; }
.edu + .edu { margin-top: 24px; }
.edu .docs { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 8px; font-size: 14px; }

/* contact */
.contact { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; }
@media (max-width: 767px) { .contact { grid-template-columns: 1fr; gap: 32px; } }
.form { display: grid; gap: 16px; }
.field label { display: block; font-size: 14px; line-height: 20px; color: var(--body); margin-bottom: 6px; }
.field input, .field textarea { width: 100%; background: var(--canvas-soft); color: var(--ink); border: 1px solid var(--hairline); border-radius: 6px;
       padding: 12px 16px; font: 400 16px/26px var(--sans); min-height: 48px; }
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--primary-soft); }
.form .btn { justify-self: start; }
.contact-list { list-style: none; display: grid; gap: 16px; }
.contact-list .k { display: block; font-size: 14px; line-height: 20px; color: var(--mute); }
.contact-list .v { color: var(--ink); }

/* duotone plane: photo already fades into the canvas at its edges */
.plane { position: relative; overflow: hidden; }
.plane img { width: 100%; height: 100%; object-fit: cover;
  -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 60%, transparent 100%);
          mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 60%, transparent 100%); }

.sidebar-plane img { object-fit: contain !important;
  -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 60%, transparent 100%);
          mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 60%, transparent 100%); }

footer.site { padding: 48px 0; border-top: 1px dashed var(--dash); color: var(--mute); font-size: 14px; line-height: 20px; }
footer.site .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

/* prototype badge, not part of the site */
.proto-badge { position: fixed; right: 12px; bottom: 12px; z-index: 50; font-family: var(--mono); font-size: 12px; color: var(--mute);
       background: var(--canvas-soft); border: 1px solid var(--hairline); border-radius: 9999px; padding: 6px 12px; }
.proto-badge a { color: var(--ink); margin-left: 8px; }

/* Hebrew letters: Heebo is embedded in fonts.css (_src/make_fonts_css.py) with Inter, so it never swaps in late */
/* language switch (EN / עב) in the top row and the mobile menu */
.lang { font-family: "JetBrains Mono", Heebo, "Courier New", monospace; font-size: 13px; color: var(--body);
        border: 1px solid var(--hairline); border-radius: 6px; padding: 2px 8px; }
.lang:hover, .lang:focus-visible { color: #fff; border-color: var(--primary); text-decoration: none; }

/* big link cards on touch screens (Ilya 2026-11-08): only the title and the button open the card, the rest lets the finger scroll;
   the border waits 150 ms, so a press that turns into a scroll never lights it. Mouse: the whole card stays the link, no button */
.tap-cta { display: none; gap: 8px; }
@media (hover: none) {
  .pcard, a.tool.link, a.cocard { pointer-events: none; -webkit-tap-highlight-color: transparent; }
  .pcard h3, a.tool.link h3, a.cocard h3, .tap-cta { pointer-events: auto; }
  .tap-cta { display: flex; margin-top: 16px; min-height: 44px; }
  .pcard:active, a.tool.link:active, a.cocard:active { transition: border-color 0s linear .15s; }
}

@media print {
  :root { --canvas: #fff; --canvas-soft: #fff; --ink: #111; --ink-strong: #111; --body: #111; --mute: #444; --hairline: #ccc; --primary-soft: #0a7a57; }
  nav, .btns, .form, .plane, .proto-badge, .sidebar-plane { display: none !important; }
  .section { padding: 24px 0; }
}

/* sidebar: title on its own line above the specialisation line */
.sidebar .role-title { display: block; color: var(--ink); font-weight: 600; margin-bottom: 4px; }
/* "Senior structural analysis engineer": 15 px so it fits one line in the 300 px card (270 px at 16 px vs 262 available; Ilya 2026-11-13);
   the phone hero eyebrow still wraps: two even lines, never one word alone */
.sidebar .role-title { font-size: 15px; }
.hero .who .eyebrow { text-wrap: balance; }

/* specialisation line: separator belongs to the next item; the container is shifted left by one separator
   and clips it, so a separator that starts a line is hidden and none can dangle at a line end */
.rl { display: block; overflow: hidden; }
.rl-in { display: block; margin-left: -0.85em; }
.ri { white-space: nowrap; }
.ri::before { content: "|"; display: inline-block; width: 0.85em; padding-left: 0.14em; box-sizing: border-box; text-align: left; color: var(--mute); }
