@font-face {
  font-family: Geist;
  src: url("/fonts/geist.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("/fonts/geist-mono.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #07080a;
  --panel: #131519;
  --line: #23262d;
  --ink: #f2efe9;
  --soft: #cfccc6;
  --dim: #8f959e;
  --accent: #ff7a59;
  --danger: #f87171;
  --gutter: clamp(20px, 4vw, 48px);
  --sans: Geist, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration-color: #4a4f59;
  text-underline-offset: 0.22em;
}
a:hover { text-decoration-color: var(--accent); }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* --- Header -------------------------------------------------------------- */

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 22px var(--gutter);
}

.brand {
  font: 500 13px var(--mono);
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--dim);
}
.brand:hover { color: var(--ink); }

.nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: none;
  font-size: 14px;
}

.lang {
  font: 500 12px var(--mono);
  letter-spacing: 0.06em;
  color: var(--dim);
  text-decoration: none;
}
.lang:hover { color: var(--ink); }

.open-palette kbd {
  display: block;
  font: 12px var(--mono);
  color: var(--dim);
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 7px;
  padding: 5px 9px;
  background: var(--bg);
  transition: color 0.15s, border-color 0.15s;
}
.open-palette:hover kbd { color: var(--accent); border-color: var(--accent); }

/* --- Home: sections over the particles ----------------------------------- */

.home .top {
  position: fixed;
  inset: 0 0 auto;
  z-index: 3;
}

.field {
  position: fixed;
  inset: 0 0 auto;
  width: 100%;
  height: 100vh;
  height: 100lvh;
  z-index: 0;
  pointer-events: none;
}
.field { opacity: 0; transition: opacity 0.7s ease; }
html.engine .field { opacity: 1; }

.scenes { position: relative; z-index: 1; }

/* Without JavaScript: a plain page, one section after another. */
.scene { padding: 40px var(--gutter); }
.scene:first-child { padding-top: 96px; }

.copy {
  max-width: 560px;
  text-shadow: 0 0 18px var(--bg), 0 0 4px var(--bg);
}

.copy h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.05;
}
.copy h2 {
  margin: 4px 0 10px;
  font-size: clamp(36px, 5.4vw, 64px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
}
.role {
  margin: 10px 0 0;
  font: 500 13px var(--mono);
  letter-spacing: 0.02em;
  color: var(--accent);
}
.step { margin: 0; font: 12.5px var(--mono); color: var(--accent); }
.lead { margin: 14px 0 0; font-size: clamp(16px, 1.6vw, 19px); color: var(--soft); }
.step + h2 + .lead { margin-top: 0; }
.proof { margin: 12px 0 0; font-size: 15px; line-height: 1.55; color: #a9aeb5; max-width: 50ch; }
.proof a { color: var(--soft); }

.links { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: 22px; font-size: 15px; }
.links a:first-child { color: var(--accent); font-weight: 600; }

.hint { display: none; }

/* With JavaScript: one screen per section, text bottom-left. */
/* Each scroll gesture lands on the next section, never past it. On very
   short screens a section may not fit: snapping stays loose there so
   nothing becomes unreachable. */
html.live { scroll-snap-type: y proximity; }
@media (min-height: 520px) {
  html.live { scroll-snap-type: y mandatory; }
  .live .scene { scroll-snap-stop: always; }
}

.live .scene {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  padding-top: 96px;
  padding-bottom: clamp(56px, 10vh, 104px);
  scroll-snap-align: start;
}

.live .copy {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.live .scene.on .copy { opacity: 1; transform: none; }

.live .hint {
  display: block;
  position: absolute;
  right: var(--gutter);
  bottom: clamp(56px, 10vh, 104px);
  margin: 0;
  font: 12px var(--mono);
  color: var(--dim);
  transition: opacity 0.4s;
}
.live .hint span { display: inline-block; animation: nudge 1.8s ease-in-out infinite; }
.live .scene:not(.on) .hint { opacity: 0; }
@keyframes nudge { 50% { transform: translateY(4px); } }

/* Engine unavailable: typography takes over from the particles. */
.no-engine .copy h2 { font-size: clamp(56px, 11vw, 150px); }

/* Section ticks, on the right. */
.steps {
  position: fixed;
  right: calc(var(--gutter) - 10px);
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.steps a {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  height: 22px;
  padding: 0 10px;
  text-decoration: none;
  font: 11.5px var(--mono);
  color: var(--dim);
}
.steps a::after {
  content: "";
  width: 12px;
  height: 1.5px;
  background: #3a3e46;
  transition: width 0.25s, background 0.25s;
}
.steps a span { opacity: 0; transform: translateX(4px); transition: opacity 0.2s, transform 0.2s; }
.steps:hover a span, .steps a:focus-visible span { opacity: 1; transform: none; }
.steps a[aria-current]::after { width: 26px; background: var(--accent); }
.steps a[aria-current] { color: var(--ink); }

.telemetry {
  position: fixed;
  right: var(--gutter);
  bottom: 18px;
  z-index: 2;
  margin: 0;
  font: 11px var(--mono);
  color: #6b717b;
  pointer-events: none;
}

/* --- Command palette ----------------------------------------------------- */

.palette {
  width: min(560px, calc(100vw - 24px));
  margin: 12vh auto auto;
  padding: 0;
  overflow: hidden;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid #2c3039;
  border-radius: 14px;
  box-shadow: 0 30px 80px #000c;
}
.palette::backdrop { background: #07080ab8; backdrop-filter: blur(3px); }

.palette input {
  width: 100%;
  padding: 16px 18px;
  font: 16px var(--sans);
  color: var(--ink);
  background: none;
  border: 0;
  border-bottom: 1px solid var(--line);
  outline: none;
}
.palette input::placeholder { color: #6b717b; }

.palette ul {
  list-style: none;
  margin: 0;
  padding: 6px;
  max-height: min(46vh, 380px);
  overflow: auto;
}
.palette li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 15px;
  cursor: pointer;
}
.palette li[aria-selected="true"] { background: #22262e; }
.palette .hint {
  display: block;
  flex: none;
  max-width: 58%;
  font-size: 13px;
  text-align: right;
  color: var(--dim);
}
.palette mark { background: none; color: var(--accent); font-weight: 600; }
.palette li.egg { background: #ff7a5918; outline: 1px solid #ff7a5950; outline-offset: -1px; }
.palette li.egg .label { color: var(--accent); }
.palette li.empty { cursor: default; color: var(--dim); }

.palette footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 12px;
  padding: 9px 14px;
  border-top: 1px solid var(--line);
  font: 11.5px var(--mono);
  color: #6b717b;
}

/* --- Career page --------------------------------------------------------- */

.page {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 var(--gutter) 72px;
}

/* Particle header: the current version, blending into the page. Space is
   only reserved when JavaScript runs. */
.banner {
  display: none;
  width: 100%;
  height: clamp(170px, 26vw, 320px);
  margin-top: -12px;
  cursor: crosshair;
  -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent);
  mask-image: linear-gradient(to bottom, #000 72%, transparent);
}
html.js .banner { display: block; }
html.no-engine .banner { display: none; }

.page-head { padding: 56px 0 26px; border-bottom: 1px solid var(--line); }
html.js .page-head { padding-top: 4px; }
.page-head h1 {
  margin: 0;
  font-size: clamp(34px, 5.4vw, 56px);
  letter-spacing: -0.04em;
  line-height: 1.02;
}
.sub { margin: 14px 0 0; max-width: 56ch; color: var(--dim); }

.meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin-top: 18px;
  font: 12.5px var(--mono);
  color: var(--dim);
}
.pill { color: var(--accent); border: 1px solid #ff7a5955; border-radius: 99px; padding: 2px 10px; }
.ok::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 3px #4ade8030;
}

.flag { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
/* The flag needs JavaScript: without it, the plain descriptions show. */
html:not(.js) .flag { display: none; }
.flag input {
  appearance: none;
  position: relative;
  width: 30px;
  height: 16px;
  margin: 0;
  border-radius: 99px;
  background: #2b2f37;
  cursor: pointer;
  transition: background 0.2s;
}
.flag input::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--dim);
  transition: left 0.2s, background 0.2s;
}
.flag input:checked { background: var(--accent); }
.flag input:checked::after { left: 16px; background: var(--bg); }

/* The timeline: a rail, one dot per release, glowing for those still live. */
.releases {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 8px 0 0;
}
.releases::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 40px;
  bottom: 40px;
  width: 1px;
  background: linear-gradient(var(--accent), var(--line) 22%);
}
.rel {
  position: relative;
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 8px 24px;
  padding: 24px 0 24px 34px;
  scroll-margin-top: 16px;
}
.rel::before {
  content: "";
  position: absolute;
  left: 0;
  top: 31px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bg);
  border: 1.5px solid #4a4f59;
  transition: border-color 0.2s, transform 0.2s;
}
.rel:has(.tag.live)::before {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px #ff7a5926;
}
.rel:hover::before, .rel:target::before { border-color: var(--accent); transform: scale(1.3); }
.rel:target h2 { color: var(--accent); }
.ver code { display: block; font: 500 14px var(--mono); color: var(--soft); padding-top: 3px; }
.tag {
  display: inline-block;
  margin-top: 8px;
  padding: 2px 7px;
  border-radius: 5px;
  font: 700 10px var(--mono);
  letter-spacing: 0.08em;
}
.tag.live { background: #ff7a591f; color: var(--accent); }
.tag.breaking { background: #f871711f; color: var(--danger); }
.tag.legacy { background: #ffffff12; color: var(--dim); }

.rel h2 { margin: 0; font-size: 19px; line-height: 1.3; letter-spacing: -0.015em; }
.rel .at { font-weight: 500; color: var(--dim); }
.when { margin: 3px 0 10px; font: 12.5px var(--mono); color: var(--dim); }
.rel p { margin: 0 0 8px; }
.rel p:not([class]) { font-size: 15.5px; color: var(--soft); }
.rel p:last-child { margin-bottom: 0; }
.stack { font: 12.5px/1.6 var(--mono); color: var(--dim); }
.buzzed { color: var(--accent) !important; }

.extras {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 28px;
  padding-top: 36px;
}
.extras h2 {
  margin: 0 0 10px;
  font: 600 12px var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
}
.extras ul { list-style: none; margin: 0; padding: 0; font-size: 15px; color: var(--soft); }
.extras li + li { margin-top: 4px; }

/* --- Small screens ------------------------------------------------------- */

@media (max-width: 640px) {
  .top { padding-top: 16px; padding-bottom: 16px; }
  .nav { gap: 14px; }
  .steps a span { display: none; }
  .steps { right: 0; }
  .steps a { padding: 0 8px; height: 18px; }
  .steps a::after { width: 8px; }
  .steps a[aria-current]::after { width: 16px; }
  .telemetry { display: none; }
  .live .hint { bottom: auto; top: 22px; right: auto; left: 50%; transform: translateX(-50%); display: none; }
  .rel { grid-template-columns: 1fr; padding-left: 28px; }
  .ver { display: flex; align-items: center; gap: 10px; }
  .ver code { padding: 0; }
  .tag { margin: 0; }
  .flag { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* --- Print: the career page becomes a plain CV --------------------------- */

@media print {
  :root {
    --bg: #fff;
    --ink: #111;
    --soft: #222;
    --dim: #555;
    --line: #ddd;
    --accent: #b8431f;
    color-scheme: light;
  }
  .nav, .flag, .ok { display: none; }
  .page { max-width: none; padding-bottom: 0; }
  .page-head { padding-top: 16px; }
  .rel { padding: 14px 0; break-inside: avoid; }
}
