:root {
  --bg: #0e0d14;
  --bg-bar: #17141f;
  --bg-raised: #1b1826;
  --text: #ece9f2;
  --dim: #a39fb0;
  --rule: rgba(236, 233, 242, 0.16);
  --purple: #b39ad6;
  --purple-mark: #9b7bc8;
  --purple-ink: #6b4e8c;
  --ok: #8fd19e;
  --wait: #e8bf6a;
  --mono: "Geist Mono", ui-monospace, monospace;
  --title: "Chivo Mono", ui-monospace, monospace;
  --sans: "Geist", system-ui, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}
* {
  box-sizing: border-box;
}
html {
  background: var(--bg);
  scroll-behavior: smooth;
  scrollbar-color: #3a3350 var(--bg);
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.6;
  caret-color: var(--purple);
  -webkit-font-smoothing: antialiased;
}
::selection {
  background: var(--purple-ink);
  color: #fff;
}
a {
  color: var(--purple);
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}
a:hover {
  color: var(--text);
}
:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 3px;
  border-radius: 2px;
}
img {
  display: block;
  max-width: 100%;
  height: auto;
}
h1,
h2,
h3 {
  font-family: var(--title);
}
.wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Status bar */
.bar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg-bar);
  border-bottom: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 14px;
}
.bar .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 24px;
  min-height: 56px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
}
.windows {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  margin: 0 auto 0 8px;
}
.windows a {
  color: var(--dim);
  text-decoration: none;
  padding: 10px 10px;
  border-radius: 3px;
}
.windows a:hover {
  color: var(--text);
  background: var(--bg-raised);
}
.windows a[aria-current="true"] {
  color: var(--text);
}
.windows a[aria-current="true"]::after {
  content: "*";
  color: var(--purple);
}
.windows a b {
  color: var(--purple);
  font-weight: 500;
}
.clock {
  color: var(--dim);
  font-variant-numeric: tabular-nums;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 4px;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 16px;
  text-decoration: none;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.btn-primary {
  background: var(--purple-ink);
  color: #fff;
}
.btn-primary:hover {
  background: #7d5ea1;
  color: #fff;
}
.btn-line {
  border: 1px solid var(--dim);
  color: var(--text);
}
.btn-line:hover {
  border-color: var(--purple);
  color: var(--text);
  background: var(--bg-raised);
}
.bar .btn {
  min-height: 40px;
  padding: 0 14px;
  font-size: 14px;
}

/* Panes: 1px rules, the title set into the border */
.pane {
  position: relative;
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 40px 40px 36px;
}
.pane-title {
  position: absolute;
  top: -0.75em;
  left: 20px;
  padding: 0 8px;
  background: var(--bg);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.5;
  color: var(--dim);
}
section {
  scroll-margin-top: 80px;
}
/* One session: panes tile edge to edge and share their 1px rules, like tmux splits. */
main .pane,
.contact .pane {
  border-radius: 0;
  margin-top: -1px;
}
.hero .pane {
  border-radius: 6px 6px 0 0;
  margin-top: 0;
}
.contact .pane {
  border-radius: 0 0 6px 6px;
}
.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
}
.split > section + section .pane {
  margin-left: -1px;
}
.split .pane {
  height: calc(100% + 1px);
}

/* Hero */
.hero {
  padding-top: 40px;
}
.head {
  display: grid;
  gap: 20px;
  margin-bottom: 32px;
}
h1 {
  margin: 0;
  font-weight: 900;
  font-size: clamp(36px, 4.9vw, 68px);
  line-height: 1.04;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.cursor {
  display: inline-block;
  width: 0.5em;
  height: 0.09em;
  margin-left: 0.12em;
  background: var(--purple-mark);
  vertical-align: baseline;
}
@media (prefers-reduced-motion: no-preference) {
  .cursor {
    animation: blink 1.1s steps(1) infinite;
  }
  @keyframes blink {
    50% { opacity: 0; }
  }
}
.lede {
  margin: 0;
  max-width: 46em;
  color: var(--dim);
  font-size: 19px;
}
.run {
  margin: 0;
  padding: 24px 0 0;
  border-top: 1px solid var(--rule);
  list-style: none;
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.5;
}
.run li {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 5px 0;
}
.run .cmd {
  color: var(--text);
}
.run .cmd .ps {
  color: var(--purple);
}
.run .k {
  color: var(--dim);
  white-space: nowrap;
}
.run .dots {
  flex: 1;
  min-width: 24px;
  border-bottom: 2px dotted rgba(236, 233, 242, 0.22);
  transform: translateY(-4px);
}
.run .v {
  color: var(--text);
  text-align: right;
}
.run .ok::before {
  content: "✓ ";
  color: var(--ok);
}
.q {
  color: var(--wait);
}
.caret {
  display: inline-block;
  width: 0.6em;
  height: 1.1em;
  margin-left: 6px;
  vertical-align: -0.2em;
  background: var(--wait);
}
@media (prefers-reduced-motion: no-preference) {
  .caret {
    animation: blink 1.1s steps(1) infinite;
  }
}
.ask .then {
  display: none;
  color: var(--ok);
}
.ask.done .wait {
  display: none;
}
.ask.done .then {
  display: inline;
}
.note {
  margin-left: auto;
  color: var(--dim);
  font-size: 13px;
}
.you {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--rule);
}
.you p {
  margin: 0;
  font-family: var(--mono);
  font-size: 16px;
}
.you p .q {
  margin-right: 8px;
}
.you .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
/* The run types itself out once: the command, then each call, its leader filling, then the result.
   Lines keep their space while hidden, so nothing below jumps. Everything is visible without JS or with reduced motion. */
.run.playing li:not(.on) {
  visibility: hidden;
}
.run.playing li .dots {
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s linear;
}
.run.playing li.filled .dots {
  transform: scaleX(1);
}
.run.playing li .v,
.run.playing li .note {
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}
.run.playing li.answered .v,
.run.playing li.answered .note {
  opacity: 1;
}
.tcaret {
  display: inline-block;
  width: 0.6em;
  height: 1.15em;
  margin-left: 2px;
  vertical-align: -0.22em;
  background: var(--purple);
}

/* Profile, neofetch-style */
.profile {
  padding-top: 0;
}
.profile .pane {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  align-content: start;
}
.profile .pane > svg {
  width: 80px;
  height: 80px;
}
.facts {
  margin: 0;
  font-family: var(--mono);
  font-size: 16px;
  line-height: 1.5;
}
.facts div {
  display: grid;
  grid-template-columns: 11ch minmax(0, 1fr);
  gap: 16px;
  padding: 6px 0;
}
.facts dt {
  color: var(--purple);
}
.facts dd {
  margin: 0;
}
.facts dd span {
  color: var(--dim);
}
.clients {
  grid-column: 1 / -1;
  border-top: 1px solid var(--rule);
  padding-top: 24px;
}
.clients h2 {
  margin: 0 0 16px;
  font-size: 13px;
  font-weight: 400;
  color: var(--dim);
}
.clients ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 22px 44px;
}
@media (min-width: 901px) {
  .clients ul {
    display: grid;
    grid-template-columns: repeat(4, auto);
    justify-content: space-between;
  }
}
.clients img {
  height: 26px;
  width: auto;
  filter: grayscale(1) invert(1) brightness(1.6) contrast(1.1);
  mix-blend-mode: screen;
  opacity: 0.75;
}

/* Products, fzf-style list with preview */
.work {
  padding-top: 0;
}
h2 {
  margin: 0 0 28px;
  font-weight: 900;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.03em;
}
.picker {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: 0;
  border-top: 1px solid var(--rule);
}
.list {
  margin: 0;
  padding: 16px 0;
  border-right: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
}
.count {
  padding: 0 4px 10px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--dim);
}
.count b {
  color: var(--purple);
  font-weight: 400;
}
.list button {
  all: unset;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 2ch minmax(0, 1fr) auto;
  gap: 8px;
  align-items: baseline;
  padding: 12px 16px 12px 4px;
  min-height: 48px;
  font-family: var(--mono);
  font-size: 16px;
  color: var(--dim);
  cursor: pointer;
  border-radius: 3px;
}
.list button::before {
  content: "";
}
.list button:hover {
  color: var(--text);
  background: var(--bg-raised);
}
.list button[aria-selected="true"] {
  color: var(--text);
  background: var(--bg-raised);
}
.list button[aria-selected="true"]::before {
  content: ">";
  color: var(--purple);
}
.list button:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: -2px;
}
.tag {
  font-size: 13px;
  color: var(--ok);
}
.tag.pilot {
  color: var(--wait);
}
.preview {
  padding: 24px 0 0 32px;
}
.item h3 {
  margin: 0 0 6px;
  font-weight: 700;
  font-size: 26px;
  letter-spacing: -0.02em;
}
.item p {
  margin: 0 0 12px;
  max-width: 40em;
}
.item .meta {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--dim);
}
.item .shot {
  margin: 20px 0 16px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  overflow: hidden;
}
.item .shot img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top;
}
.visit {
  font-family: var(--mono);
  font-size: 16px;
}
@media (prefers-reduced-motion: no-preference) {
  .item:not([hidden]) {
    animation: reveal 0.35s var(--ease);
  }
  @keyframes reveal {
    from { clip-path: inset(0 0 100% 0); }
    to { clip-path: inset(0 0 0 0); }
  }
}

/* Services, man-page layout */
.services {
  padding-top: 0;
}
.manhead {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 32px;
  font-family: var(--mono);
  font-size: 14px;
  color: var(--dim);
}
.man {
  margin: 0;
}
.man dt {
  margin-top: 24px;
  font-family: var(--mono);
  font-weight: 600;
  font-size: 18px;
  color: var(--purple);
}
.man dt:first-child {
  margin-top: 0;
}
.man dd {
  margin: 6px 0 0 4ch;
  max-width: 44em;
}

/* Contact */
.contact {
  padding: 0;
}
.contact p {
  margin: 0 0 28px;
  max-width: 40em;
  color: var(--dim);
  font-size: 19px;
}
.contact .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.reach {
  margin: 24px 0 0;
  font-family: var(--mono);
  font-size: 15px;
  color: var(--dim);
}
footer {
  margin-top: 56px;
  border-top: 1px solid var(--rule);
  background: var(--bg-bar);
}
footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 16px;
  padding-bottom: 20px;
  font-family: var(--mono);
  font-size: 14px;
  color: var(--dim);
}

@media (max-width: 900px) {
  .pane {
    padding: 32px 20px 24px;
  }
  .clock {
    display: none;
  }
  .windows {
    order: 3;
    width: 100%;
    margin: 0 0 6px -10px;
  }
  .split {
    grid-template-columns: minmax(0, 1fr);
  }
  .split > section + section .pane {
    margin-left: 0;
  }
  .profile .pane {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .picker {
    grid-template-columns: minmax(0, 1fr);
  }
  /* On phones the list would only repeat the items, so every item shows in full. */
  .list {
    display: none;
  }
  .preview {
    padding: 8px 0 0;
  }
  .item[hidden] {
    display: block;
  }
  .item + .item {
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid var(--rule);
  }
  .run li {
    flex-wrap: wrap;
    gap: 2px 12px;
  }
  .run .dots {
    display: none;
  }
  .run .k {
    white-space: normal;
  }
  .run .v {
    text-align: left;
    width: 100%;
    padding-left: 2ch;
  }
  .run .k + .v {
    padding-left: 2ch;
  }
  .note {
    margin-left: 0;
    width: 100%;
  }
}
@media (max-width: 560px) {
  body {
    font-size: 17px;
  }
  .facts div {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
  .you .actions .btn,
  .contact .actions .btn {
    width: 100%;
    justify-content: center;
  }
  .manhead span:nth-child(2) {
    display: none;
  }
  .windows {
    font-size: 13px;
  }
  .windows a {
    padding: 10px 5px;
  }
}

/* Experience: git log --graph */
.log {
  margin: 0;
  padding: 0;
  list-style: none;
  border-left: 1px solid var(--rule);
  margin-left: 6px;
}
.log li {
  position: relative;
  display: grid;
  grid-template-columns: 10ch minmax(0, 1fr);
  gap: 24px;
  padding: 0 0 32px 28px;
}
.log li:last-child {
  padding-bottom: 0;
}
.log li::before {
  content: "*";
  position: absolute;
  left: -0.42em;
  top: 0.05em;
  padding: 0 2px;
  background: var(--bg);
  font-family: var(--mono);
  font-size: 18px;
  line-height: 1.4;
  color: var(--purple);
}
.log .when {
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.7;
  color: var(--purple);
}
.log h2 {
  margin: 0 0 6px;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.02em;
}
.log p {
  margin: 0;
  max-width: 44em;
  color: var(--dim);
}

/* Journey: two paths, side by side */
.split.even {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
.path h2 {
  margin-bottom: 14px;
}
.path p {
  margin: 0 0 20px;
  max-width: 40em;
}
.stories {
  margin: 0;
  padding: 16px 0 0;
  list-style: none;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 15px;
}
.stories li {
  padding: 6px 0;
  color: var(--text);
}
.stories li::before {
  content: "- ";
  color: var(--purple);
}
.page-title {
  margin: 0 0 32px;
  font-weight: 900;
  font-size: clamp(32px, 4vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.035em;
}
@media (max-width: 900px) {
  .split.even {
    grid-template-columns: minmax(0, 1fr);
  }
  .log li {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }
}

.page-title:last-child {
  margin-bottom: 0;
}
