/* ofekkorotkin.com: steel paper, navy ink, forge ember.
   Status colours are semantic everywhere: green = done/passed, amber = in progress/running, grey = planned/queued. */
:root {
  --paper: #e7ebef;
  --panel: #f8fafb;
  --ink: #172433;
  --muted: #536070;
  --line: #c9d1da;
  --track: #d7dde4;
  --ember: #c9410b;
  --ember-ink: #ffffff;
  --pass: #1f7a45;
  --run: #b36b00;
  --queued: #8d99a6;
  --term-bg: #172433;
  --term-ink: #dce4ec;
  --term-dim: #8fa0b3;
  --term-pass: #74d39e;
  --term-run: #f2b544;
  --term-ember: #ff8a50;
  --sans: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --r-s: 4px;
  --r-m: 10px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #101922;
    --panel: #172331;
    --ink: #e3e9ef;
    --muted: #9aa7b4;
    --line: #2a3a4c;
    --track: #24323f;
    --ember: #ff7438;
    --ember-ink: #1b0d05;
    --pass: #4fc37e;
    --run: #f0b23e;
    --queued: #5c6b7b;
    --term-bg: #0b131b;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 4.5rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  font-variation-settings: "wdth" 100;
}
.wrap { max-width: 72rem; margin: 0 auto; padding: 0 1.25rem 4rem; }
a { color: inherit; text-decoration-color: var(--ember); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--ember); }
:focus-visible { outline: 3px solid var(--ember); outline-offset: 3px; border-radius: 2px; }
code { font-family: var(--mono); font-size: .86em; background: var(--track); padding: .1em .35em; border-radius: var(--r-s); }
pre { background: var(--track); padding: 1rem; border-radius: var(--r-m); overflow-x: auto; }
pre code { background: none; padding: 0; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; font-weight: 700; }
.num.big { font-size: 3.5rem; line-height: 1; font-weight: 850; font-variation-settings: "wdth" 125; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: .5rem; background: var(--ember); color: var(--ember-ink); padding: .4rem .8rem; z-index: 10; }
.skip:focus { left: .5rem; }

h1, h2, h3, h4 { line-height: 1.1; margin: 0; }
h2 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); font-weight: 820; font-variation-settings: "wdth" 118; letter-spacing: -.015em; }
h3 { font-size: 1.3rem; font-weight: 720; }
h4 { font-size: 1.08rem; font-weight: 700; }
section { margin-top: clamp(4rem, 9vw, 7rem); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font: 650 .95rem/1 var(--sans); font-variation-settings: "wdth" 100;
  padding: .8rem 1.15rem; border-radius: 999px; cursor: pointer;
  background: var(--ember); color: var(--ember-ink); border: 2px solid var(--ember); text-decoration: none;
}
.btn:hover { color: var(--ember-ink); filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--ember); color: var(--ink); }

/* top bar */
.topbar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap;
  padding: .7rem max(1.25rem, calc((100% - 69.5rem) / 2));
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  font-size: .93rem;
}
.topbar a { text-decoration: none; }
.brand { display: inline-flex; align-items: center; gap: .55rem; font-weight: 800; font-variation-settings: "wdth" 120; }
.brand img { display: block; border-radius: 6px; }
.links { display: flex; gap: 1.1rem; }
.status { margin-left: auto; display: inline-flex; align-items: center; gap: .5rem; color: var(--muted); }
.dot { width: .6rem; height: .6rem; border-radius: 50%; background: var(--run); flex: none; }
.status .dot, .run-state .dot { box-shadow: 0 0 0 0 color-mix(in srgb, var(--run) 60%, transparent); animation: beacon 2.4s ease-out infinite; }
@keyframes beacon { 70% { box-shadow: 0 0 0 .5rem transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

/* hero */
.hero { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 2.5rem 3rem; align-items: end; padding-top: clamp(3rem, 8vw, 6rem); }
.hero-copy { grid-column: 1 / -1; }
.hero h1 {
  font-size: clamp(3.2rem, 11.5vw, 9.5rem); font-weight: 880; line-height: .86;
  font-variation-settings: "wdth" 125; letter-spacing: -.03em;
}
.role { margin: .6rem 0 0; font-size: clamp(1.35rem, 3vw, 2.2rem); font-weight: 500; font-variation-settings: "wdth" 62; color: var(--muted); }
.pitch { max-width: 34ch; font-size: 1.22rem; margin: 1.6rem 0 0; }
.elsewhere { display: flex; gap: 1.2rem; margin: 1rem 0 0; font-weight: 650; }
.cta { display: flex; flex-wrap: wrap; gap: .7rem; margin: 1.6rem 0 0; }
@media (min-width: 60rem) {
  .hero-copy { display: contents; }
  .hero h1, .role { grid-column: 1 / -1; }
  .elsewhere { grid-column: 1; grid-row: 5; align-self: start; margin-top: -1.5rem; }
  .role { margin: -1.6rem 0 -1rem; }
  .pitch, .cta { grid-column: 1; }
  .pitch { align-self: end; }
  .cta { align-self: start; margin-top: -1rem; }
  .hero .pipe { grid-column: 2; grid-row: 3 / span 3; }
}
.hero.plain { display: block; }

/* pipeline widget */
.pipe {
  margin: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 1rem; box-shadow: 0 1px 0 var(--line), 0 18px 40px -24px rgb(23 36 51 / .45);
}
.pipe-head { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; font-size: .9rem; }
.run-state { display: inline-flex; align-items: center; gap: .45rem; font-weight: 700; }
.pipe-file { color: var(--muted); }
.pipe-head .btn { margin-left: auto; padding: .5rem .85rem; font-size: .85rem; }
.stages { list-style: none; margin: 1rem 0; padding: 0; display: grid; grid-template-columns: repeat(var(--cols, 5), minmax(0, 1fr)); gap: .45rem; }
.col { position: relative; display: grid; gap: .35rem; align-content: start; }
.col.par { padding-left: .5rem; border-left: 2px dashed var(--run); }
.col + .col::before { content: ""; position: absolute; left: -.5rem; top: 1.4rem; width: .45rem; height: 2px; background: var(--line); }
.stage {
  position: relative; padding: .55rem .6rem .6rem; border-radius: var(--r-s);
  background: var(--paper); border: 1px solid var(--line); border-top: 4px solid var(--queued);
  font-size: .82rem; line-height: 1.25; transition: border-color .25s, background .25s;
}
.st-name { display: block; font-weight: 700; }
.st-years { color: var(--muted); font-variant-numeric: tabular-nums; }
.st-icon { float: right; width: .9rem; height: .9rem; border-radius: 50%; border: 2px solid var(--queued); margin: .05rem 0 0 .3rem; }
.stage.done { border-top-color: var(--pass); }
.stage.done .st-icon { border-color: var(--pass); background: var(--pass); box-shadow: inset 0 0 0 2px var(--panel); }
.stage.running { border-top-color: var(--run); background: color-mix(in srgb, var(--run) 9%, var(--paper)); }
.stage.running .st-icon { border-color: var(--run); border-right-color: transparent; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.term {
  margin: 0; height: 15.5rem; overflow: auto; background: var(--term-bg); color: var(--term-ink);
  border-radius: var(--r-m); padding: .9rem 1rem; font: 400 .8rem/1.6 var(--mono); white-space: pre-wrap;
}
.term code { font-size: inherit; background: none; padding: 0; color: inherit; }
.term .c { color: var(--term-dim); }
.term .h { color: var(--term-ember); font-weight: 600; }
.term .ok { color: var(--term-pass); }
.term .run { color: var(--term-run); }
.term .cursor { display: inline-block; width: .55em; height: 1.05em; vertical-align: text-bottom; background: var(--term-ink); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@keyframes crew-in { from { transform: rotate(-200deg) scale(.2); opacity: 0; } }
@media (max-width: 40rem) {
  .stages { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .col + .col::before { display: none; }
}

/* build race */
.bench { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); gap: 2rem 3.5rem; align-items: center; }
.bench h2 { font-size: clamp(2.4rem, 6vw, 4.6rem); font-variation-settings: "wdth" 125; }
.bench-copy p { max-width: 40ch; }
.hint { color: var(--muted); font-size: .88rem; }
.race { display: grid; gap: 1.4rem; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 1.6rem; }
.lane { display: grid; grid-template-columns: 1fr auto; gap: .4rem 1rem; align-items: center; }
.lane-name { font-weight: 650; }
.clock { grid-row: 1; grid-column: 2; font: 600 1.05rem var(--mono); font-variant-numeric: tabular-nums; }
.track { grid-column: 1 / -1; height: 1.6rem; background: var(--track); border-radius: var(--r-s); overflow: hidden; }
.fill { display: block; height: 100%; border-radius: var(--r-s); }
.before .fill { background: var(--queued); }
.after .fill { background: var(--ember); }
.lane.before.finished .clock::after { content: " ✓"; color: var(--pass); }
.crew-badge { grid-row: 1; grid-column: 3; border-radius: 50%; animation: crew-in .8s cubic-bezier(.2,.8,.2,1.2); }
.lane:has(.crew-badge) { grid-template-columns: 1fr auto auto; }
.lane:has(.crew-badge) .track { grid-column: 1 / -1; }

/* old vs new pipeline */
.compare { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.6rem 2.5rem; }
.cmp-copy p { max-width: 52ch; }
.cmp-controls { align-self: end; }
.ctl-label { margin: 0 0 .45rem; font-weight: 650; font-size: .92rem; }
.ctl-label + * { margin-bottom: 1rem; }
.chips, .toggles { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip {
  font: 500 .85rem var(--mono); padding: .4rem .7rem; border-radius: 999px; cursor: pointer;
  background: var(--panel); color: var(--ink); border: 1px solid var(--line);
}
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.tog { display: inline-flex; align-items: center; gap: .35rem; font: 500 .85rem var(--mono); padding: .3rem .6rem; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--panel); cursor: pointer; }
.tog input { accent-color: var(--ember); margin: 0; }
.yaml { margin: 0; background: var(--term-bg); color: var(--term-ink); font: .8rem/1.6 var(--mono); }
.cmp-old, .cmp-new { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 1.3rem; }
.cmp-new { border-color: var(--ember); box-shadow: inset 0 4px 0 var(--ember); }
.cmp-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 1rem; }
.cmp-head h3 { font-size: 1.1rem; }
.count { font-weight: 800; font-variation-settings: "wdth" 120; font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.cmp-new .count { color: var(--ember); }
.jgrid { display: grid; gap: .35rem; }
.jrow { display: grid; grid-template-columns: 8.5rem repeat(3, minmax(0, 1fr)); gap: .35rem; align-items: center; }
.jname { font: 500 .8rem var(--mono); color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.job { font: 500 .74rem var(--mono); text-align: center; padding: .4rem 0; border-radius: var(--r-s); border: 1px solid var(--line); color: var(--muted); }
.job.run { background: color-mix(in srgb, var(--run) 16%, var(--panel)); border-color: var(--run); color: var(--ink); }
.cmp-new .job.run { background: color-mix(in srgb, var(--ember) 16%, var(--panel)); border-color: var(--ember); }
.job.skip { border-style: dashed; opacity: .55; }
.job.pop { animation: pop .35s ease-out; }
@keyframes pop { from { transform: scale(.85); } }
@media (max-width: 60rem) { .compare { grid-template-columns: 1fr; } .jrow { grid-template-columns: 7rem repeat(3, minmax(0, 1fr)); } }

/* Forge */
.forge-head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 2rem 4rem; align-items: start; }
.forge-head p { max-width: 62ch; }
.lede { font-size: 1.2rem; }
.gauge { display: grid; gap: .6rem; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 1.4rem; }
.pods { list-style: none; margin: .6rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, 1.6rem); gap: .35rem; }
.pod { display: inline-block; width: 1.6rem; height: 1.6rem; border-radius: var(--r-s); background: var(--paper); border: 2px solid var(--queued); }
.pod.done { background: var(--pass); border-color: var(--pass); }
.pod.doing { background: color-mix(in srgb, var(--run) 30%, var(--paper)); border-color: var(--run); }
.pods-key { font-size: .84rem; color: var(--muted); margin: .2rem 0 0; }
.pods-key .pod { width: .8rem; height: .8rem; vertical-align: -1px; margin: 0 .2rem 0 .5rem; border-width: 2px; }
.pods-key .pod:first-child { margin-left: 0; }

.bar { height: .5rem; background: var(--track); border-radius: 999px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--pass); border-radius: inherit; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 1.4rem; margin-top: 2.5rem; }
.now { border-left: 6px solid var(--run); }
.card-head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; margin-bottom: .8rem; }
.card-head h3 { font-size: 1.35rem; }
.when { display: block; font-size: .9rem; font-weight: 500; color: var(--muted); margin-bottom: .3rem; }
.card-head .num { font-size: 1.6rem; }

.sub { font-size: clamp(1.9rem, 3.4vw, 2.6rem); font-weight: 800; font-variation-settings: "wdth" 115; margin: 3rem 0 1.2rem; }
.months { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem; }
.month { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-m); padding: 1.1rem; }
.month.current { border-color: var(--run); box-shadow: inset 0 4px 0 var(--run); }
.month.past { opacity: .8; }
.month header { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: .2rem .6rem; margin-bottom: .5rem; }
.month .meta { grid-column: 2; display: flex; align-items: center; gap: .5rem; margin: 0; }
.month h4 { overflow-wrap: anywhere; }
.month h4 { font-size: clamp(1.3rem, 1.9vw, 1.7rem); font-weight: 850; font-variation-settings: "wdth" 120; letter-spacing: -.01em; }
.step { flex: none; display: grid; place-items: center; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--ink); color: var(--paper); font-weight: 800; font-size: .85rem; }
.focus { color: var(--muted); font-size: .92rem; margin: 0 0 .8rem; }
.tag { display: inline-block; font-size: .72rem; font-weight: 700; background: var(--run); color: var(--panel); padding: .1rem .45rem; border-radius: 999px; vertical-align: middle; }

.items { list-style: none; margin: .9rem 0 0; padding: 0; }
.item { display: flex; align-items: baseline; gap: .55rem; padding: .45rem 0; border-top: 1px solid var(--line); font-size: .93rem; }
.item:first-child { border-top: 0; }
.mark { flex: none; width: .7rem; height: .7rem; border-radius: 50%; border: 2px solid var(--queued); transform: translateY(1px); }
.item.done .mark { background: var(--pass); border-color: var(--pass); }
.item.doing .mark { border-color: var(--run); background: color-mix(in srgb, var(--run) 35%, transparent); }
.item.done .t { color: var(--muted); }
.day { flex: none; width: 2.2rem; font-weight: 700; color: var(--muted); font-size: .85rem; }
.t { flex: 1; }
.pill { flex: none; font-size: .74rem; font-weight: 650; padding: .08rem .5rem; border-radius: 999px; color: var(--muted); border: 1px solid var(--line); }
.pill.done { color: var(--pass); border-color: currentColor; }
.pill.doing { color: var(--run); border-color: currentColor; }

.stack { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 0; border-top: 2px solid var(--ink); }
.stack-area { padding: 1rem 1.2rem 1.2rem 0; border-bottom: 1px solid var(--line); }
.stack-area ul { margin: .5rem 0 0; padding-left: 1.05rem; font-size: .93rem; }
.stack-area li::marker { color: var(--ember); }

.log .entry { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: .3rem 2rem; padding: 1.8rem 0; border-top: 1px solid var(--line); }
.log h2 { margin-bottom: 1.2rem; }
.entry time { color: var(--muted); font-variant-numeric: tabular-nums; padding-top: .15rem; }
.entry h4 { font-size: 1.4rem; font-variation-settings: "wdth" 110; }
.entry h4 a { text-decoration: none; }
.entry .prose { grid-column: 2; max-width: 68ch; }
.prose h3 { font-size: 1.1rem; margin: 1.4rem 0 .4rem; }

footer { margin-top: 5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .88rem; }

@media (max-width: 60rem) {
  .hero, .bench, .forge-head { grid-template-columns: 1fr; }
  .log .entry { grid-template-columns: 1fr; }
  .entry .prose { grid-column: 1; }
  .status { margin-left: 0; width: 100%; }
}
@media (max-width: 30rem) { .links { gap: .8rem; } .topbar { gap: .4rem 1rem; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
  .topbar, .pipe, .bench, .cta { display: none; }
  body { background: #fff; color: #000; }
}
