:root {
  --bg: #faf8f4;
  --surface: #ffffff;
  --ink: #1d1d1b;
  --muted: #5f5d57;
  --line: #e6e1d8;
  --accent: #2f5d50;
  --accent-soft: #e4eeea;
  --tag: #f1ece3;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.05);
  --body-font: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --head-font: Fraunces, Georgia, serif;
}
:root:lang(he) {
  --body-font: Heebo, system-ui, -apple-system, "Segoe UI", sans-serif;
  --head-font: "Frank Ruhl Libre", "Times New Roman", serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141513; --surface: #1c1e1b; --ink: #ecebe6; --muted: #a3a29b;
    --line: #2f322e; --accent: #8cc2b0; --accent-soft: #233630; --tag: #262925; --shadow: none;
  }
}
:root[data-theme="dark"] {
  --bg: #141513; --surface: #1c1e1b; --ink: #ecebe6; --muted: #a3a29b;
  --line: #2f322e; --accent: #8cc2b0; --accent-soft: #233630; --tag: #262925; --shadow: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.6 var(--body-font);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
.wrap { max-width: 920px; margin: 0 auto; padding: 0 24px; }

/* nav */
nav { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 56px; }
nav .name { font-weight: 600; text-decoration: none; color: var(--ink); }
nav .right { display: flex; align-items: center; gap: 22px; }
nav ul { list-style: none; display: flex; gap: 22px; margin: 0; padding: 0; font-size: 15px; }
nav ul a { color: var(--muted); text-decoration: none; }
nav ul a:hover { color: var(--ink); }
.lang { font-size: 14px; font-weight: 500; text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: 3px 12px; color: var(--ink); }
.lang:hover { border-color: var(--accent); }

/* hero */
header.hero { padding: 88px 0 56px; }
.eyebrow { font-size: 14px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin: 0 0 14px; }
:lang(he) .eyebrow { letter-spacing: 0; }
h1, h2, h3 { font-family: var(--head-font); font-weight: 600; letter-spacing: -.01em; line-height: 1.15; }
:lang(he) h1, :lang(he) h2, :lang(he) h3 { letter-spacing: 0; font-weight: 700; }
h1 { font-size: clamp(36px, 6vw, 58px); margin: 0 0 20px; }
.lede { font-size: 20px; color: var(--muted); max-width: 660px; margin: 0 0 28px; }
.langs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 32px; padding: 0; list-style: none; }
.langs li { background: var(--tag); border-radius: 999px; padding: 4px 12px; font-size: 14px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-block; padding: 11px 20px; border-radius: 10px; font-weight: 500; font-size: 15px; text-decoration: none; border: 1px solid var(--line); color: var(--ink); background: var(--surface); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.btn:hover { filter: brightness(.96); }

/* stats */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding: 8px 0 72px; }
.stat { border-top: 2px solid var(--accent); padding-top: 14px; }
.stat b { display: block; font-family: var(--head-font); font-size: 34px; font-weight: 600; line-height: 1.1; }
.stat span { color: var(--muted); font-size: 15px; }

section, footer { scroll-margin-top: 56px; }
section { padding: 56px 0; border-top: 1px solid var(--line); }
h2 { font-size: 32px; margin: 0 0 8px; }
.section-intro { color: var(--muted); margin: 0 0 32px; max-width: 640px; }
h2 + .cases { margin-top: 28px; }

/* case studies */
.cases { display: grid; gap: 20px; }
.case { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 28px; box-shadow: var(--shadow); }
.case-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin-bottom: 6px; }
.case h3 { font-size: 23px; margin: 0; }
.year { color: var(--muted); font-size: 14px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 18px; padding: 0; list-style: none; }
.tags li { font-size: 13px; background: var(--accent-soft); color: var(--accent); padding: 2px 10px; border-radius: 999px; font-weight: 500; }
.case dl { display: grid; grid-template-columns: 120px 1fr; gap: 10px 20px; margin: 0; }
.case dt { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; padding-top: 3px; }
:lang(he) .case dt { font-size: 14px; letter-spacing: 0; }
.case dd { margin: 0; }
.case .links { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 10px; }
.case .note { margin-top: 18px; font-size: 14px; color: var(--muted); font-style: italic; }
.case.featured { border-color: var(--accent); }
.figures { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 0 0 18px; padding: 14px 0; border-block: 1px dashed var(--line); }
.figures div b { font-family: var(--head-font); font-size: 24px; display: block; line-height: 1.1; }
.figures div span { font-size: 13px; color: var(--muted); }

/* skills */
.skills { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px 40px; }
.skills h3 { font-size: 19px; margin: 0 0 6px; }
.skills p { margin: 0; color: var(--muted); }

/* background */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 140px 1fr; gap: 20px; padding: 14px 0; border-bottom: 1px dashed var(--line); }
.timeline li:last-child { border-bottom: 0; }
.timeline .when { color: var(--muted); font-size: 15px; }
.timeline b { font-weight: 600; }
.timeline .where { color: var(--muted); }

footer { padding: 64px 0 80px; border-top: 1px solid var(--line); }
footer h2 { margin-bottom: 12px; }
footer p { color: var(--muted); max-width: 560px; margin: 0 0 24px; }
.fine { margin-top: 48px; font-size: 13px; color: var(--muted); }

@media (max-width: 700px) {
  .wrap { padding: 0 16px; }
  nav ul { display: none; }
  header.hero { padding: 56px 0 40px; }
  .lede { font-size: 18px; }
  .stats { grid-template-columns: 1fr; gap: 20px; padding-bottom: 48px; }
  .case { padding: 22px 18px; }
  .case dl { grid-template-columns: 1fr; gap: 2px; }
  .case dd { margin-bottom: 12px; }
  .skills { grid-template-columns: 1fr; }
  .timeline li { grid-template-columns: 1fr; gap: 2px; }
}
