:root {
  --bg: #0c0c0e;
  --ink: #f4efe8;
  --dim: #b9b2a8;
  --brand: #ff9300;
  --off: #8f969e;
  --col: min(100vw, calc(100dvh * 9 / 16));
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.35 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
}

body {
  background: radial-gradient(120% 60% at 50% 100%, #2a1a08 0%, var(--bg) 60%);
}

/* ── Stage: one slide per job, the line and the glyph trail on top ───────── */

#stage {
  --p: 1; /* 1: all with Claude, 0: all without Claude */
  position: fixed;
  inset: 0;
  margin: 0 auto;
  width: var(--col);
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
  background: #000;
}

.slide {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  will-change: transform;
}
.slide.anim { transition: transform 380ms var(--ease); }

.layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
/* The with image shows left of the line */
.layer.with { clip-path: inset(0 calc((1 - var(--p)) * 100%) 0 0); }

.layer .lqip {
  position: absolute;
  inset: -24px;
  background: var(--lqip) center / cover no-repeat;
  filter: blur(14px);
}

.layer img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 280ms ease;
  -webkit-user-drag: none;
}
.layer.ready img { opacity: 1; }

#fx {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  filter: drop-shadow(0 0 3px rgba(255, 147, 0, .9));
}

#line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(var(--p) * 100%);
  width: 0;
  z-index: 2;
  pointer-events: none;
  transition: opacity 200ms;
}
#line::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -1.5px;
  width: 3px;
  background: var(--brand);
  box-shadow: 0 0 12px 1px rgba(255, 147, 0, .85);
}
#line .grip {
  position: absolute;
  top: 50%;
  left: 0;
  translate: -50% -50%;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: var(--brand);
  background: rgba(12, 12, 14, .8);
  border: 2px solid var(--brand);
  box-shadow: 0 0 14px rgba(255, 147, 0, .6);
}
#stage.edge #line, #stage.paging #line { opacity: 0; }

/* ── Header, dots and toggle ─────────────────────────────────────────────── */

.top, .panel {
  position: fixed;
  left: 50%;
  translate: -50% 0;
  width: var(--col);
  z-index: 3;
  pointer-events: none;
}
.top > *, .panel > * { pointer-events: auto; }

.top {
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(env(safe-area-inset-top) + 12px) 14px 32px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, .5), transparent);
}

.brand {
  font-size: 14px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--dim);
  text-shadow: 0 1px 6px rgba(0, 0, 0, .6);
}
.brand b { color: var(--ink); }
body.on .brand b { color: var(--brand); }

.info {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  color: var(--ink);
  background: rgba(20, 20, 22, .55);
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 50%;
  cursor: pointer;
  backdrop-filter: blur(6px);
}

/* One dot per job, in a column at the right edge */
.dots {
  position: fixed;
  top: 50%;
  right: max(0px, calc((100vw - var(--col)) / 2));
  translate: 0 -50%;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 4px;
}
.dots button {
  width: 18px;
  height: 18px;
  padding: 5.5px;
  border: 0;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, .4);
  background-clip: content-box;
  cursor: pointer;
  transition: background-color 200ms, transform 200ms;
}
.dots button[aria-current="true"] { background-color: var(--ink); transform: scale(1.35); }
body.on .dots button[aria-current="true"] { background-color: var(--brand); }

.panel {
  bottom: 0;
  display: flex;
  justify-content: center;
  padding: 40px 16px calc(env(safe-area-inset-bottom) + 18px);
  background: linear-gradient(to top, rgba(0, 0, 0, .55), transparent);
}

.switch {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: rgba(20, 20, 22, .6);
  border: 1px solid rgba(255, 255, 255, .18);
  backdrop-filter: blur(6px);
}
.switch button {
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--dim);
  background: none;
  border: 0;
  border-radius: 999px;
  padding: 7px 16px;
  cursor: pointer;
  transition: background 250ms, color 250ms, box-shadow 250ms;
}
.switch button[aria-pressed="true"][data-mode="0"] { background: var(--off); color: #111; }
.switch button[aria-pressed="true"][data-mode="1"] {
  background: var(--brand);
  color: #1a0d00;
  box-shadow: 0 0 18px rgba(255, 147, 0, .65);
}

/* ── About ───────────────────────────────────────────────────────────────── */

.chip {
  font: inherit;
  font-size: 13px;
  color: var(--ink);
  background: rgba(20, 20, 22, .55);
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
}

dialog {
  position: fixed;
  width: min(92vw, 380px);
  border: 1px solid rgba(255, 147, 0, .45);
  border-radius: 16px;
  background: #151517;
  color: var(--ink);
  padding: 20px;
}
dialog::backdrop { background: rgba(0, 0, 0, .6); }
dialog h2 { margin: 0 0 8px; padding-right: 36px; font-size: 20px; }
dialog .close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  color: var(--ink);
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 50%;
  cursor: pointer;
}
dialog .made {
  margin: 14px 0 0;
  text-align: center;
  font-size: 13px;
  color: var(--dim);
}
dialog ul { padding-left: 18px; }
dialog .small { font-size: 12px; color: var(--dim); }
dialog .now { color: #ffc57a; }
dialog a { color: var(--brand); font-weight: 600; letter-spacing: .04em; text-decoration: none; }
dialog a:hover { text-decoration: underline; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  .slide.anim { transition-duration: 1ms; }
}
