:root {
  --bg: #0d1117;
  --surface: #151b23;
  --surface-2: #1c2430;
  --ink: #e8edf3;
  --muted: #9aa6b2;
  --line: #26303c;
  --accent: #3ddc97;
  --accent-2: #5ab0ff;
  --accent-soft: rgba(61, 220, 151, .12);
}
:root[data-theme="light"] {
  --bg: #f7f8fa; --surface: #ffffff; --surface-2: #f0f2f5; --ink: #111820;
  --muted: #57626e; --line: #e1e5ea; --accent: #0f9d63; --accent-2: #1f6fd1; --accent-soft: rgba(15,157,99,.1);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: "Inter", system-ui, sans-serif; background: var(--bg); color: var(--ink); line-height: 1.6; -webkit-font-smoothing: antialiased; }
html[lang="he"] body { font-family: "Heebo", "Inter", system-ui, sans-serif; }
a { color: inherit; }
.mono { font-family: "JetBrains Mono", ui-monospace, monospace; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

nav { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.logo { font-weight: 700; text-decoration: none; font-family: "JetBrains Mono", monospace; font-size: .95rem; direction: ltr; }
.logo span { color: var(--accent); }
nav ul { list-style: none; display: flex; gap: 24px; align-items: center; }
nav ul a { text-decoration: none; color: var(--muted); font-size: .92rem; }
nav ul a:hover { color: var(--ink); }
nav ul a.lang { color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 5px 10px; font-weight: 600; }
.theme-btn { background: none; border: 1px solid var(--line); color: var(--muted); border-radius: 8px; width: 34px; height: 34px; cursor: pointer; font-size: 1rem; }
@media (max-width: 700px) { nav ul { gap: 12px; } nav ul li.link { display: none; } }

.hero { padding: 88px 0 72px; position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 44px 44px; opacity: .35; mask-image: radial-gradient(ellipse at 70% 30%, #000 10%, transparent 70%); pointer-events: none; }
.hero-grid { position: relative; display: grid; grid-template-columns: 1.5fr 1fr; gap: 48px; align-items: center; }
.prompt { color: var(--accent); font-size: .9rem; margin-bottom: 16px; direction: ltr; text-align: start; }
html[dir="rtl"] .prompt { text-align: right; }
.prompt .cursor { display: inline-block; width: 8px; height: 1em; background: var(--accent); vertical-align: -2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
h1 { font-size: clamp(2.6rem, 6.5vw, 4.2rem); font-weight: 800; line-height: 1.05; letter-spacing: -.02em; margin-bottom: 14px; }
.role { font-size: clamp(1.1rem, 2.4vw, 1.35rem); font-weight: 600; margin-bottom: 18px; }
.role em { font-style: normal; background: linear-gradient(90deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { color: var(--muted); font-size: 1.08rem; max-width: 560px; margin-bottom: 30px; }
.btns { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 20px; border-radius: 10px; text-decoration: none; font-weight: 600; font-size: .95rem; border: 1px solid var(--line); background: var(--surface); transition: transform .15s, border-color .15s; }
.btn:hover { transform: translateY(-2px); border-color: var(--accent); }
.btn.primary { background: var(--accent); color: #06130d; border-color: var(--accent); }
.btn svg { width: 18px; height: 18px; }
.photo { justify-self: center; position: relative; }
.photo img { width: 300px; max-width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 24px; display: block; border: 1px solid var(--line); }
.photo::after { content: ""; position: absolute; inset: 14px -14px -14px 14px; border: 2px solid var(--accent); border-radius: 24px; z-index: -1; opacity: .6; }
@media (max-width: 800px) { .hero { padding-top: 48px; } .hero-grid { grid-template-columns: 1fr; gap: 36px; } .photo { order: -1; justify-self: start; } .photo img { width: 180px; } }

.areas { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 64px; }
.area { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; }
.area b { display: block; font-size: 1rem; margin-bottom: 4px; }
.area span { color: var(--muted); font-size: .9rem; }
.area .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-inline-end: 8px; }
@media (max-width: 800px) { .areas { grid-template-columns: 1fr; } }

section { padding: 80px 0; border-top: 1px solid var(--line); }
.kicker { color: var(--accent); font-size: .85rem; margin-bottom: 8px; }
html[dir="rtl"] .kicker { direction: ltr; text-align: right; }
html[dir="rtl"] .contact .kicker { text-align: center; }
h2 { font-size: clamp(1.8rem, 4vw, 2.4rem); font-weight: 800; letter-spacing: -.01em; margin-bottom: 10px; }
.sub { color: var(--muted); max-width: 640px; margin-bottom: 40px; }

.projects { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
@media (max-width: 800px) { .projects { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 26px; display: flex; flex-direction: column; transition: border-color .2s, transform .2s; }
.card:hover { border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); transform: translateY(-3px); }
.card .top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 6px; }
.card h3 { font-size: 1.3rem; }
.label { font-size: .75rem; padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); white-space: nowrap; }
.label.private { background: var(--surface-2); color: var(--muted); }
.card .what { color: var(--muted); font-size: .92rem; margin-bottom: 14px; }
.card ul { list-style: none; margin-bottom: 18px; }
.card li { position: relative; padding-inline-start: 18px; font-size: .95rem; margin-bottom: 4px; }
.card li::before { content: "›"; position: absolute; inset-inline-start: 2px; color: var(--accent); font-weight: 700; }
html[dir="rtl"] .card li::before { content: "‹"; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 4px; direction: ltr; }
html[dir="rtl"] .tags { justify-content: flex-end; }
.tag { font-family: "JetBrains Mono", monospace; font-size: .75rem; padding: 4px 9px; border-radius: 6px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.card .links { margin-top: 16px; display: flex; gap: 16px; }
.card .links a { color: var(--accent-2); font-size: .9rem; font-weight: 600; text-decoration: none; }
.card .links a:hover { text-decoration: underline; }

.skills { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 900px) { .skills { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .skills { grid-template-columns: 1fr; } }
.skill { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px; }
.skill h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); margin-bottom: 10px; font-weight: 600; }
html[lang="en"] .skill h4 { font-family: "JetBrains Mono", monospace; font-weight: 500; }
html[lang="he"] .skill h4 { font-size: .95rem; letter-spacing: 0; }
.skill p { font-size: .95rem; }

.timeline { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
@media (max-width: 800px) { .timeline { grid-template-columns: 1fr; } }
.timeline h3 { font-size: 1.1rem; margin-bottom: 18px; color: var(--muted); font-weight: 600; }
.item { position: relative; padding-bottom: 24px; padding-inline-start: 22px; border-inline-start: 2px solid var(--line); }
.item:last-child { padding-bottom: 0; }
.item::before { content: ""; position: absolute; inset-inline-start: -7px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent); }
.item .when { font-family: "JetBrains Mono", monospace; font-size: .8rem; color: var(--accent); }
.item h4 { font-size: 1.05rem; }
.item .where { color: var(--muted); font-size: .92rem; }
.item p { color: var(--muted); font-size: .92rem; margin-top: 6px; }

.contact { text-align: center; background: linear-gradient(135deg, var(--surface), var(--surface-2)); border: 1px solid var(--line); border-radius: 22px; padding: 56px 24px; }
.contact .sub { margin: 0 auto 28px; }
.contact .btns { justify-content: center; }
footer { padding: 32px 0; color: var(--muted); font-size: .85rem; text-align: center; }

.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } .prompt .cursor { animation: none; } html { scroll-behavior: auto; } }
