/* barak-tal.com - design direction 1a "Technical" */

:root,
:root[data-theme="dark"] {
  --bg: #0B0C0E;
  --bg2: #15161A;
  --ink: #EEEEEC;
  --mut: #9B9EA6;
  --line: rgba(238, 238, 236, .13);
  --acc: oklch(0.70 0.18 264);
  --onacc: #0B0C0E;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #F6F6F4;
  --bg2: #ECECE8;
  --ink: #111215;
  --mut: #575A62;
  --line: rgba(17, 18, 21, .13);
  --acc: oklch(0.53 0.25 264);
  --onacc: #FFFFFF;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Geist', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  transition: background .3s, color .3s;
}

a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }

.mono { font-family: 'Geist Mono', ui-monospace, monospace; }
.mut { color: var(--mut); }
.acc { color: var(--acc); }

/* Page frame: the design is a 1280px column; on wider screens it sits centred with side rules */
.page {
  max-width: 1280px;
  margin: 0 auto;
  min-height: 100vh;
}
@media (min-width: 1282px) {
  .page { border-inline: 1px solid var(--line); }
}

/* Nav */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 56px;
  border-bottom: 1px solid var(--line);
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 13px;
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  transition: background .3s;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand::before { content: ""; width: 8px; height: 8px; background: var(--acc); }
.nav-links { display: flex; gap: 32px; color: var(--mut); }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); }
.theme-toggle {
  font: inherit;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line);
  padding: 7px 12px;
  border-radius: 4px;
  cursor: pointer;
}
.theme-toggle:hover { border-color: var(--ink); }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  border-bottom: 1px solid var(--line);
}
.hero-main {
  padding: 96px 56px 88px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 36px;
}
.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 13px;
  color: var(--mut);
}
.eyebrow::before {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--acc);
}
.hero h1 {
  font-size: clamp(48px, 7.2vw, 92px);
  line-height: 0.98;
  font-weight: 500;
  letter-spacing: -0.045em;
}
.lede {
  font-size: 20px;
  line-height: 1.5;
  color: var(--mut);
  max-width: 620px;
  text-wrap: pretty;
}
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  padding: 14px 22px;
  border-radius: 4px;
  font-size: 15px;
  border: 1px solid var(--line);
}
.btn:hover { border-color: var(--ink); }
.btn-primary {
  background: var(--acc);
  color: var(--onacc);
  font-weight: 500;
  border-color: transparent;
}
.btn-primary:hover { opacity: .88; border-color: transparent; }

.facts {
  display: flex;
  flex-direction: column;
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 13px;
}
.fact {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-bottom: 1px solid var(--line);
}
.fact:last-child { border-bottom: 0; }
.fact > span:first-child { color: var(--mut); }
.fact > span:last-child, .fact > a { font-size: 15px; }
.fact > a { color: var(--acc); }
.fact > a:hover { text-decoration: underline; }

/* Section heads */
.section-head {
  padding: 72px 56px 24px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}
.h2 {
  font-size: 40px;
  font-weight: 500;
  letter-spacing: -0.03em;
}
.count { font-family: 'Geist Mono', ui-monospace, monospace; font-size: 13px; color: var(--mut); }

/* Work */
.tag-row { display: flex; gap: 8px; font-family: 'Geist Mono', ui-monospace, monospace; font-size: 12px; }
.tag-row > span:first-child { color: var(--acc); }
.tag-row > span:last-child { color: var(--mut); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; font-family: 'Geist Mono', ui-monospace, monospace; font-size: 12px; }
.chips > span { border: 1px solid var(--line); padding: 4px 8px; border-radius: 3px; }

.featured {
  margin: 0 56px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  transition: border-color .2s;
}
.featured:hover { border-color: var(--acc); }
.featured-body {
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  justify-content: space-between;
}
.featured-body > div:first-child { display: flex; flex-direction: column; gap: 16px; }
.featured h3 { font-size: 36px; font-weight: 500; letter-spacing: -0.03em; }
.featured p { font-size: 17px; line-height: 1.55; color: var(--mut); text-wrap: pretty; }
.more { font-size: 15px; font-weight: 500; color: var(--acc); }

/* Screenshot slot. Drop an <img> inside to replace the striped placeholder. */
.shot {
  min-height: 380px;
  background: repeating-linear-gradient(135deg, var(--line) 0 1px, transparent 1px 11px);
  border-left: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 12px;
  color: var(--mut);
  overflow: hidden;
}
.shot img { width: 100%; height: 100%; object-fit: cover; display: block; }

.grid-2 {
  margin: 16px 56px 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.card {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color .2s;
}
.card:hover { border-color: var(--acc); }
.card h3 { font-size: 24px; font-weight: 500; letter-spacing: -0.02em; }
.card p { font-size: 16px; line-height: 1.55; color: var(--mut); text-wrap: pretty; flex: 1; }
.card .more { font-size: 14px; }

/* Split sections (Experience, About) */
.split {
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
}
.split.first { margin-top: 96px; }
.split-label { padding: 56px; border-right: 1px solid var(--line); }

.xp-row {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr) auto;
  gap: 24px;
  padding: 28px 56px;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.xp-row:last-child { border-bottom: 0; }
.xp-row > span:nth-child(1) { font-family: 'Geist Mono', ui-monospace, monospace; font-size: 13px; color: var(--mut); }
.xp-row > span:nth-child(2) { font-size: 18px; }
.xp-row > span:nth-child(3) { font-size: 16px; color: var(--mut); text-align: right; }

.about {
  padding: 56px;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 56px;
}
.about > p { font-size: 20px; line-height: 1.55; text-wrap: pretty; }
.skills { display: flex; flex-direction: column; gap: 18px; font-size: 15px; }
.skills > div { display: flex; flex-direction: column; gap: 4px; }
.skills > div > span:first-child { font-family: 'Geist Mono', ui-monospace, monospace; font-size: 12px; color: var(--mut); }

/* Footer */
.footer {
  border-top: 1px solid var(--line);
  padding: 96px 56px 40px;
  display: flex;
  flex-direction: column;
  gap: 64px;
}
.footer-contact { display: flex; flex-direction: column; gap: 20px; }
.footer-mail {
  font-size: clamp(30px, 5.6vw, 72px);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1;
  overflow-wrap: anywhere;
}
.footer-mail:hover { color: var(--acc); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 13px;
  color: var(--mut);
}
.footer-bottom nav { display: flex; gap: 28px; }
.footer-bottom a:hover { color: var(--ink); }

/* Case study pages */
.cs-hero h1 { font-size: clamp(42px, 6vw, 76px); }
.back { font-family: 'Geist Mono', ui-monospace, monospace; font-size: 13px; color: var(--mut); }
.back:hover { color: var(--ink); }

.cs-shot { margin: 56px 56px 0; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.cs-shot .shot { border-left: 0; min-height: 0; aspect-ratio: 16 / 8; }
.cs-shot .shot:has(img) { aspect-ratio: auto; }
.cs-shot .shot img { height: auto; }

.cs-section {
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
}
.cs-section:first-of-type { margin-top: 72px; }
.cs-section .split-label h2 { font-size: 13px; font-family: 'Geist Mono', ui-monospace, monospace; font-weight: 400; color: var(--mut); letter-spacing: 0; text-transform: uppercase; }
.cs-body {
  padding: 56px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 820px;
  font-size: 18px;
  line-height: 1.6;
}
.cs-body p { text-wrap: pretty; }
.cs-body ul { margin: 0; padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 14px; }
.cs-body li { display: grid; grid-template-columns: 28px minmax(0, 1fr); }
.cs-body li::before { content: "-"; font-family: 'Geist Mono', ui-monospace, monospace; color: var(--acc); }
.cs-body strong { font-weight: 500; }

.next {
  border-top: 1px solid var(--line);
  padding: 56px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  flex-wrap: wrap;
}
.next a { font-size: 32px; font-weight: 500; letter-spacing: -0.03em; }
.next a:hover { color: var(--acc); }

/* Responsive */
@media (max-width: 1040px) {
  .hero, .split, .cs-section { grid-template-columns: minmax(0, 1fr); }
  .hero-main, .split-label { border-right: 0; }
  .hero-main { border-bottom: 1px solid var(--line); }
  .facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fact { border-bottom: 1px solid var(--line); }
  .fact:nth-child(odd) { border-right: 1px solid var(--line); }
  .fact:nth-last-child(-n+2) { border-bottom: 0; }
  .split-label { padding-bottom: 0; }
  .cs-section .split-label { padding-bottom: 0; }
  .featured { grid-template-columns: minmax(0, 1fr); }
  .featured .shot { border-left: 0; border-top: 1px solid var(--line); min-height: 280px; order: -1; }
}

@media (max-width: 720px) {
  .nav { padding: 16px 20px; flex-wrap: wrap; row-gap: 12px; }
  .nav-links { order: 3; width: 100%; gap: 20px; overflow-x: auto; }
  .hero-main { padding: 56px 20px; gap: 28px; }
  .eyebrow { align-items: flex-start; line-height: 1.5; }
  .eyebrow::before { margin-top: 6px; }
  .lede { font-size: 18px; }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .fact { padding: 20px; border-right: 0 !important; border-bottom: 1px solid var(--line) !important; }
  .fact:last-child { border-bottom: 0 !important; }
  .section-head { padding: 56px 20px 20px; }
  .h2 { font-size: 32px; }
  .featured, .grid-2 { margin-left: 20px; margin-right: 20px; }
  .featured-body, .card { padding: 24px; }
  .featured h3 { font-size: 28px; }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .split.first { margin-top: 72px; }
  .split-label { padding: 40px 20px 0; }
  .xp-row { grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 20px; }
  .xp-row > span:nth-child(3) { text-align: left; }
  .about { grid-template-columns: minmax(0, 1fr); padding: 24px 20px 40px; gap: 32px; }
  .about > p { font-size: 18px; }
  .footer { padding: 72px 20px 32px; gap: 48px; }
  .cs-shot { margin: 40px 20px 0; }
  .cs-section:first-of-type { margin-top: 56px; }
  .cs-body { padding: 20px 20px 40px; font-size: 17px; }
  .next { padding: 40px 20px; }
  .next a { font-size: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
