:root {
  --bg: #0e1220;
  --bg-alt: #131829;
  --surface: #1a2034;
  --surface-2: #222a42;
  --line: rgba(255, 255, 255, .08);
  --fg: #eef0f7;
  --muted: #a5abc0;
  --accent: #ff5a5f;
  --accent-2: #ff8a5b;
  --radius: 18px;
  --shadow: 0 20px 50px -20px rgba(0, 0, 0, .55);
  --font: "Inter", "Heebo", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}
html[lang="he"] { --font: "Heebo", "Inter", system-ui, Arial, sans-serif; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: var(--font); font-size: 17px; line-height: 1.65;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; }

.wrap { width: min(1160px, 100% - 40px); margin-inline: auto; }
.skip { position: absolute; inset-inline-start: -999px; top: 8px; background: var(--accent); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { inset-inline-start: 8px; }

/* NAV */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(14, 18, 32, .72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid transparent; transition: border-color .2s, background .2s; }
.nav.is-scrolled { border-bottom-color: var(--line); background: rgba(14, 18, 32, .9); }
.nav__inner { width: min(1160px, 100% - 40px); margin-inline: auto; display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; }
.brand__mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); font-size: 14px; letter-spacing: .5px; }
.nav__links { display: flex; gap: 4px; margin-inline-start: auto; }
.nav__links a { text-decoration: none; color: var(--muted); font-size: 15px; font-weight: 500; padding: 8px 12px; border-radius: 10px; transition: color .15s, background .15s; }
.nav__links a:hover { color: var(--fg); background: var(--surface); }
.nav__actions { display: flex; align-items: center; gap: 8px; }
.lang { display: flex; align-items: center; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; cursor: pointer; font-size: 14px; font-weight: 600; }
.lang span[data-l] { color: var(--muted); transition: color .15s; }
.lang__sep { opacity: .35; }
html[lang="en"] .lang [data-l="en"], html[lang="he"] .lang [data-l="he"] { color: var(--accent); }
.burger { display: none; width: 42px; height: 42px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; cursor: pointer; flex-direction: column; justify-content: center; align-items: center; gap: 4px; }
.burger span { width: 18px; height: 2px; background: var(--fg); border-radius: 2px; }

/* BUTTONS */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 24px; border-radius: 999px; font-weight: 600; text-decoration: none; transition: transform .15s, box-shadow .15s, background .15s; }
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; box-shadow: 0 12px 30px -10px rgba(255, 90, 95, .6); }
.btn--ghost { border: 1px solid var(--line); background: var(--surface); }
.btn--ghost:hover { background: var(--surface-2); }
.link { color: var(--accent); text-decoration: none; font-weight: 600; font-size: 15px; }
.link:hover { text-decoration: underline; }

/* HERO */
.hero { position: relative; padding: 72px 0 96px; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: -30% -10% auto auto; width: 720px; height: 720px; background: radial-gradient(circle, rgba(255, 90, 95, .22), transparent 65%); pointer-events: none; }
html[dir="rtl"] .hero::before { inset: -30% auto auto -10%; }
.hero__grid { position: relative; display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.eyebrow { color: var(--accent); font-weight: 600; letter-spacing: .5px; margin-bottom: 10px; }
.hero h1 { font-size: clamp(2.6rem, 6.5vw, 4.6rem); font-weight: 800; letter-spacing: -.02em; }
.hero__role { font-size: clamp(1.2rem, 2.6vw, 1.6rem); font-weight: 600; margin-top: 10px; background: linear-gradient(90deg, var(--fg), var(--muted)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__lead { color: var(--muted); max-width: 560px; margin-top: 20px; font-size: 1.08rem; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.stats { display: grid; grid-template-columns: repeat(3, auto); gap: 28px; margin-top: 48px; justify-content: start; }
.stats li { display: flex; flex-direction: column; border-inline-start: 2px solid var(--accent); padding-inline-start: 14px; }
.stats strong { font-size: 1.1rem; }
.stats span { color: var(--muted); font-size: 14px; }
.hero__photo { position: relative; }
.hero__photo::after { content: ""; position: absolute; inset: 24px -24px -24px 24px; border: 2px solid rgba(255, 90, 95, .45); border-radius: 28px; z-index: -1; }
html[dir="rtl"] .hero__photo::after { inset: 24px 24px -24px -24px; }
.hero__photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 25%; border-radius: 28px; box-shadow: var(--shadow); }

/* SECTIONS */
.section { padding: 96px 0; }
.section--alt { background: var(--bg-alt); border-block: 1px solid var(--line); }
.kicker { color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: 2px; font-size: 13px; margin-bottom: 10px; }
html[lang="he"] .kicker { letter-spacing: 0; font-size: 15px; }
.section h2 { font-size: clamp(1.9rem, 4vw, 2.7rem); font-weight: 800; letter-spacing: -.01em; margin-bottom: 40px; }
.section__lead { color: var(--muted); max-width: 680px; margin: -24px 0 40px; }
.center { text-align: center; margin-top: 40px; }

/* ABOUT */
.about { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; }
.about h2 { margin-bottom: 0; }
.about__body { display: grid; gap: 18px; color: var(--muted); font-size: 1.05rem; }
.about__body p:first-child { color: var(--fg); font-size: 1.15rem; }

/* CV */
.cv { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
.cv__heading { font-size: 1.15rem; margin: 0 0 20px; color: var(--muted); font-weight: 600; }
.cv > div > .cv__heading:not(:first-child) { margin-top: 40px; }
.timeline { position: relative; display: grid; gap: 14px; }
.timeline li { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 20px; padding-inline-start: 26px; }
.timeline li::before { content: ""; position: absolute; inset-inline-start: 0; top: 16px; bottom: 16px; width: 3px; border-radius: 3px; background: linear-gradient(var(--accent), var(--accent-2)); }
.timeline__date { display: block; font-size: 13px; font-weight: 600; color: var(--accent); margin-bottom: 4px; font-variant-numeric: tabular-nums; }
.timeline h4 { font-size: 1.05rem; }
.timeline p { color: var(--muted); font-size: 15px; margin-top: 2px; }
.skills { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.skills__group h4 { font-size: 14px; color: var(--fg); margin-bottom: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; font-size: 13.5px; color: var(--muted); }

/* PROJECTS */
.projects { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.project { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s, border-color .2s; }
.project:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: rgba(255, 90, 95, .35); }
.project:first-child { grid-column: 1 / -1; display: grid; grid-template-columns: 1.1fr 1fr; }
.project img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: var(--surface-2); }
.project:first-child img { aspect-ratio: auto; height: 100%; }
.project__body { padding: 26px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.project__body h3 { font-size: 1.35rem; }
.project__body p { color: var(--muted); font-size: 15.5px; flex: 1; }
.links { display: flex; flex-wrap: wrap; gap: 18px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { font-size: 12px; font-weight: 600; color: var(--accent); background: rgba(255, 90, 95, .1); border-radius: 6px; padding: 3px 9px; }

/* VIDEOS */
.videos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.video { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.video__thumb { position: relative; padding: 0; border: 0; background: #000; cursor: pointer; aspect-ratio: 16 / 9; overflow: hidden; }
.video__thumb img { width: 100%; height: 100%; object-fit: cover; opacity: .85; transition: transform .3s, opacity .3s; }
.video__thumb:hover img { transform: scale(1.04); opacity: 1; }
.play { position: absolute; inset: 0; margin: auto; width: 62px; height: 62px; border-radius: 50%; background: rgba(255, 90, 95, .92); box-shadow: 0 8px 24px rgba(0, 0, 0, .4); }
.play::after { content: ""; position: absolute; inset: 0; margin: auto; width: 0; height: 0; border-style: solid; border-width: 11px 0 11px 18px; border-color: transparent transparent transparent #fff; transform: translateX(3px); }
.video iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; display: block; }
.video__body { padding: 20px 22px 24px; display: grid; gap: 8px; }
.video__body h3 { font-size: 1.08rem; }
.video__body p { color: var(--muted); font-size: 14.5px; }
.badge { justify-self: start; font-size: 12px; font-weight: 600; color: var(--accent-2); background: rgba(255, 138, 91, .1); border-radius: 6px; padding: 3px 9px; }

/* DESIGN GALLERY */
.gallery { columns: 4 220px; column-gap: 16px; }
.gallery button { display: block; width: 100%; margin: 0 0 16px; padding: 0; border: 0; border-radius: 14px; overflow: hidden; background: var(--surface); cursor: zoom-in; break-inside: avoid; }
.gallery img { width: 100%; transition: transform .35s; }
.gallery button:hover img { transform: scale(1.04); }
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(5, 7, 14, .92); display: grid; place-items: center; padding: 24px; }
.lightbox[hidden] { display: none; }
.lightbox img { max-height: 90vh; max-width: 100%; width: auto; border-radius: 12px; box-shadow: var(--shadow); }
.lightbox__close { position: absolute; top: 16px; inset-inline-end: 16px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); font-size: 26px; cursor: pointer; line-height: 1; }

/* HOBBIES */
.hobbies { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.hobby { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.hobby img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.hobby > div { padding: 18px 20px 22px; display: grid; gap: 6px; align-content: start; }
.hobby h3 { font-size: 1.08rem; }
.hobby p { color: var(--muted); font-size: 14.5px; }
.hobby--wide { grid-column: span 2; grid-row: span 2; }
.hobby--wide img { aspect-ratio: auto; flex: 1; min-height: 260px; }
.hobby--wide h3 { font-size: 1.35rem; }
.hobby--wide p { font-size: 15.5px; }

/* CONTACT */
.contact { text-align: center; background: radial-gradient(ellipse at 50% 120%, rgba(255, 90, 95, .2), transparent 60%); }
.contact__inner { display: flex; flex-direction: column; align-items: center; }
.contact .section__lead { margin-inline: auto; }
.socials { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.social { display: inline-flex; align-items: center; gap: 10px; padding: 13px 22px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; font-weight: 600; transition: transform .15s, border-color .15s; }
.social:hover { transform: translateY(-2px); border-color: var(--accent); }
.social svg { width: 20px; height: 20px; fill: currentColor; }

/* FOOTER */
.footer { border-top: 1px solid var(--line); padding: 28px 0; color: var(--muted); font-size: 14px; }
.footer__inner { display: flex; justify-content: space-between; gap: 16px; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--fg); }

/* Reveal animation */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { transition: none !important; }
}

/* RESPONSIVE */
@media (max-width: 1020px) {
  .videos { grid-template-columns: repeat(2, 1fr); }
  .hobbies { grid-template-columns: repeat(3, 1fr); }
  .hobby--wide { grid-column: span 3; grid-row: auto; flex-direction: row; }
  .hobby--wide img { width: 50%; flex: none; min-height: 0; aspect-ratio: 4 / 3; }
}
@media (max-width: 880px) {
  .nav__links { position: absolute; top: 68px; inset-inline: 0; flex-direction: column; gap: 0; padding: 8px 16px 16px; background: rgba(14, 18, 32, .98); border-bottom: 1px solid var(--line); display: none; }
  .nav__links.is-open { display: flex; }
  .nav__links a { padding: 12px; font-size: 16px; }
  .nav__actions { margin-inline-start: auto; }
  .burger { display: flex; }
  .hero { padding: 40px 0 72px; }
  .hero__grid, .about, .cv { grid-template-columns: 1fr; gap: 40px; }
  .hero__photo { order: -1; max-width: 340px; }
  .hero__photo::after { inset: 14px -14px -14px 14px; }
  html[dir="rtl"] .hero__photo::after { inset: 14px 14px -14px -14px; }
  .projects { grid-template-columns: 1fr; }
  .project:first-child { display: flex; }
  .project:first-child img { aspect-ratio: 16 / 10; height: auto; }
  .section { padding: 72px 0; }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  .wrap, .nav__inner { width: calc(100% - 32px); }
  .brand__name { display: none; }
  .stats { grid-template-columns: 1fr; gap: 16px; margin-top: 36px; }
  .videos, .skills { grid-template-columns: 1fr; }
  .hobbies { grid-template-columns: 1fr 1fr; gap: 12px; }
  .hobby--wide { grid-column: 1 / -1; flex-direction: column; }
  .hobby--wide img { width: 100%; }
  .hobby > div { padding: 14px 14px 18px; }
  .gallery { columns: 2; column-gap: 10px; }
  .gallery button { margin-bottom: 10px; }
  .footer__inner { flex-direction: column; align-items: center; }
}

/* Keep Latin tokens like C++, C#, 10+, B.Sc. readable inside Hebrew text */
.chips li, .tags li, .badge, .stats strong, .timeline__date { unicode-bidi: plaintext; }
