/* tech.asssheeesh.space — Rosé Pine (main) terminal.
   Palette: https://rosepinetheme.com/palette — names kept so they read like the theme docs. */
:root {
  --base: #191724;
  --surface: #1f1d2e;
  --overlay: #26233a;
  --muted: #6e6a86;
  --subtle: #908caa;
  --text: #e0def4;
  --love: #eb6f92;
  --gold: #f6c177;
  --rose: #ebbcba;
  --pine: #31748f;
  --foam: #9ccfd8;
  --iris: #c4a7e7;
  --hl-low: #21202e;
  --hl-med: #403d52;
  --hl-high: #524f67;

  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --fs: 14px;
  --lh: 1.6;
  --bar: 30px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-snap-type: y proximity; scroll-padding-top: var(--bar); scroll-behavior: smooth; }
body { margin: 0; }
body {
  background: var(--base);
  color: var(--text);
  font: 400 var(--fs)/var(--lh) var(--mono);
  font-variant-ligatures: contextual;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--foam); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
::selection { background: var(--hl-med); color: var(--text); }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 1px solid var(--iris); outline-offset: 2px; }

/* ── tmux status line ─────────────────────────────────────────── */
.tmux {
  position: fixed; inset: 0 0 auto 0; height: var(--bar);
  display: flex; align-items: stretch; gap: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--hl-low);
  font-size: 13px; line-height: var(--bar);
  z-index: 10;
  white-space: nowrap;
}
.tmux__windows { display: flex; }
.tmux__windows a {
  color: var(--subtle); padding: 0 14px; text-decoration: none;
  display: flex; gap: 8px;
}
.tmux__windows a .idx { color: var(--muted); }
.tmux__windows a:hover { color: var(--text); background: var(--hl-low); }
.tmux__windows a[aria-current="page"] { color: var(--rose); background: var(--overlay); font-weight: 500; }
.tmux__windows a[aria-current="page"] .idx { color: var(--gold); }
.tmux__windows a[aria-current="page"]::after { content: "*"; color: var(--gold); margin-left: -4px; }
.tmux__links { margin-left: auto; display: flex; }
.tmux__links a { display: flex; align-items: center; padding: 0 10px; color: var(--subtle); }
.tmux__links a:hover { color: var(--rose); background: var(--hl-low); }
.tmux__links svg { width: 15px; height: 15px; display: block; }
.tmux__clock { background: var(--overlay); color: var(--subtle); padding: 0 14px; }

/* ── windows & panes ──────────────────────────────────────────── */
/* one long page: each window is a viewport-tall section; panes scroll inside it */
#app { padding-top: var(--bar); }
.win {
  position: relative; display: flex; padding: 14px 10px 10px; gap: 10px;
  height: calc(100dvh - var(--bar)); min-height: 520px;
  scroll-snap-align: start;
}

.pane {
  position: relative; min-width: 0; min-height: 0;
  border: 1px solid var(--hl-med);
  border-radius: 2px;
  display: flex; flex-direction: column;
}
.pane.is-active { border-color: var(--pine); }
.pane__title {
  position: absolute; top: -0.8em; left: 12px;
  padding: 0 6px; background: var(--base);
  font-size: 12px; line-height: 1.6; color: var(--muted);
}
.pane.is-active .pane__title { color: var(--foam); }
.pane__body { flex: 1; overflow: auto; padding: 18px 22px 22px; scrollbar-width: thin; scrollbar-color: var(--hl-med) transparent; }

/* prompt:  ashish@tech ~/blog ❯ cmd */
.prompt { color: var(--text); white-space: pre-wrap; word-break: break-word; }
.prompt .u { color: var(--rose); }
.prompt .h { color: var(--foam); }
.prompt .p { color: var(--iris); }
.prompt .s { color: var(--pine); font-weight: 700; }
.prompt .c { color: var(--text); }
.out { margin: 8px 0 12px; }
.out:last-child { margin-bottom: 0; }
.out[hidden] { display: none; }

/* placeholder text — must be visibly marked */
.note {
  margin: 12px 0; padding: 6px 12px;
  border-left: 2px dashed var(--gold);
  background: color-mix(in srgb, var(--gold) 6%, transparent);
  color: var(--gold); font-size: 12.5px;
}
.note::before { content: "# placeholder: "; color: color-mix(in srgb, var(--gold) 65%, var(--base)); }

/* ── 0: whoami ────────────────────────────────────────────────── */
/* first page is only as tall as its content; widths balanced so both panes end near the same line */
#win-whoami { height: auto; min-height: 0; }
#win-whoami .pane--fetch { flex: 1.75; }
#win-whoami .pane--who { flex: 1; }
#win-whoami .pane__body { padding-bottom: 14px; }
.fetch { display: flex; gap: 28px; align-items: flex-start; }
.fetch__art { flex: none; image-rendering: pixelated; display: block; }
.fetch__info { min-width: 0; }
.fetch__head { font-weight: 700; }
.fetch__head .u { color: var(--rose); }
.fetch__head .h { color: var(--foam); }
.fetch__rule { color: var(--muted); }
.stat { display: grid; grid-template-columns: 1.6em 9.5em 1fr; }
.stat__icon { font-size: 13px; }
.stat__k { color: var(--iris); font-weight: 500; }
.stat__v { color: var(--text); min-width: 0; overflow-wrap: anywhere; }
.swatches { display: grid; grid-template-columns: repeat(8, 2.2em); margin-top: 14px; }
.swatches i { height: 1.2em; }
.who p { margin: 0 0 1em; max-width: 64ch; }
.who p:last-child { margin-bottom: 0; }
.who p:first-of-type::first-letter { color: var(--rose); }

/* ── 1: timeline ──────────────────────────────────────────────── */
#win-timeline { flex-direction: column; }
#win-timeline .pane { flex: 1; }
.tl { position: relative; margin: 6px 0 4px; display: flex; align-items: center; gap: 8px; }
.tl__nav {
  flex: none; color: var(--subtle); padding: 4px 8px; border: 1px solid var(--hl-med); border-radius: 2px;
}
.tl__nav:hover:not(:disabled) { color: var(--text); border-color: var(--subtle); }
.tl__nav:disabled { color: var(--hl-high); cursor: default; }
.tl__scroller {
  flex: 1; overflow-x: auto; overflow-y: hidden; scrollbar-width: none;
  scroll-behavior: smooth; cursor: grab;
  mask-image: linear-gradient(90deg, transparent, #000 40px, #000 calc(100% - 40px), transparent);
}
.tl__scroller::-webkit-scrollbar { display: none; }
.tl__track { position: relative; height: 340px; }
.tl__line { position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--hl-high); }
.tl__break { position: absolute; top: 50%; transform: translate(-50%, -50%); background: var(--base); color: var(--muted); padding: 0 4px; font-size: 12px; }
.tl__tick { position: absolute; top: 50%; width: 1px; height: 5px; background: var(--hl-med); }
.tl__year { position: absolute; top: calc(50% + 1px); width: 1px; height: 11px; background: var(--muted); }
.tl__year span { position: absolute; top: 12px; left: 4px; font-size: 11px; color: var(--muted); }

.ev { position: absolute; top: 50%; }
.ev__stem { position: absolute; left: 0; width: 1px; background: var(--hl-med); }
.ev__dot {
  position: absolute; left: 0; top: 0; transform: translate(-50%, -50%);
  border-radius: 50%; padding: 0;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.ev--major .ev__dot { width: 15px; height: 15px; background: var(--iris); box-shadow: 0 0 0 3px var(--base); }
.ev--minor .ev__dot { width: 7px; height: 7px; background: var(--subtle); box-shadow: 0 0 0 2px var(--base); }
.ev__dot:hover { transform: translate(-50%, -50%) scale(1.3); }
.ev.is-sel .ev__dot { box-shadow: 0 0 0 3px var(--base), 0 0 0 4px var(--gold); }
.ev.is-sel.ev--minor .ev__dot { background: var(--gold); }
.ev__label {
  position: absolute; left: 7px;
  white-space: nowrap; font-size: 12px; line-height: 1.35; padding: 2px 0;
  color: var(--subtle); text-align: left; max-width: 32ch; overflow: hidden; text-overflow: ellipsis;
}
.ev__label small { display: block; font-size: 10.5px; color: var(--muted); }
.ev--major .ev__label { color: var(--text); font-weight: 500; font-size: 12.5px; max-width: 34ch; }
.ev.is-sel .ev__label { max-width: none; z-index: 1; background: var(--base); padding-right: 6px; }
.ev.is-sel .ev__label { color: var(--gold); }
.ev__label:hover { color: var(--text); }
.ev__here {
  position: absolute; left: 0; transform: translateX(-50%);
  color: var(--love); font-size: 11.5px; white-space: nowrap; text-align: center; line-height: 1.2;
  pointer-events: none;
}
.ev__here b { display: block; font-weight: 400; }

.entry { border-top: 1px dashed var(--hl-med); padding-top: 14px; margin-top: 6px; }
.entry__head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 18px; }
.entry__title { margin: 0; font-size: 17px; font-weight: 700; color: var(--text); }
.entry--major .entry__title { color: var(--iris); }
.entry__meta { color: var(--subtle); font-size: 12.5px; }
.entry__meta .kind { color: var(--base); background: var(--subtle); padding: 0 6px; border-radius: 2px; margin-right: 8px; }
.entry--major .entry__meta .kind { background: var(--iris); }
.entry__updated { margin-left: auto; font-size: 12px; color: var(--foam); }
.entry__updated::before { content: "last updated "; color: var(--muted); }
.entry__body { max-width: 72ch; margin-top: 10px; }

/* ── 2: blog ─────────────────────────────────────────────────── */
#win-blog .pane--list { flex: 0 0 min(420px, 36%); }
#win-blog .pane--read { flex: 1; }
.search {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--hl-med); padding: 6px 10px; border-radius: 2px;
}
.search:focus-within { border-color: var(--iris); }
.search__sym { color: var(--iris); }
.search input {
  flex: 1; min-width: 0; background: none; border: 0; outline: none;
  color: var(--text); font: inherit; caret-color: var(--rose);
}
.search input::placeholder { color: var(--muted); }
.labels-btn { color: var(--subtle); font-size: 12.5px; white-space: nowrap; }
.labels-btn:hover, .labels-btn[aria-expanded="true"] { color: var(--rose); }
.labels { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.labels[hidden] { display: none; }
.label {
  font-size: 12px; color: var(--subtle); border: 1px solid var(--hl-med); padding: 1px 8px; border-radius: 2px;
}
.label:hover { color: var(--text); border-color: var(--hl-high); }
.label[aria-pressed="true"] { color: var(--base); background: var(--foam); border-color: var(--foam); }
.shell { margin: 14px 0 6px; font-size: 12.5px; color: var(--subtle); min-height: 1.6em; word-break: break-all; }
.shell .sh-cmd { color: var(--text); }
.shell .sh-op { color: var(--love); }
.shell .sh-str { color: var(--gold); }
.shell .sh-flag { color: var(--foam); }
.posts { list-style: none; margin: 0; padding: 0; }
.post { border-left: 2px solid transparent; }
.post a { display: block; padding: 8px 10px; color: var(--text); text-decoration: none; }
.post a:hover { background: var(--hl-low); }
.post.is-sel { border-left-color: var(--rose); }
.post.is-sel a { background: var(--overlay); }
.post__title { display: block; }
.post__title mark { background: none; color: var(--love); font-weight: 700; }
.post__meta { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.post__meta .tag { color: var(--pine); }
.post__meta .tag.hit { color: var(--foam); }
.post.is-in { animation: in 0.22s ease both; }
@keyframes in { from { opacity: 0; transform: translateX(-6px); } }
.posts__count { margin-top: 10px; font-size: 12px; color: var(--muted); }

.article { max-width: 74ch; }
.article h1 { font-size: 26px; line-height: 1.35; margin: 18px 0 8px; color: var(--text); font-weight: 700; }
.article .meta { font-size: 12.5px; color: var(--subtle); display: flex; flex-wrap: wrap; gap: 4px 16px; margin-bottom: 22px; }
.article .meta .tag { color: var(--foam); }
.article .meta .upd { color: var(--foam); }
.article .meta .upd::before { content: "last updated "; color: var(--muted); }
/* body text shared by blog posts and timeline entries: rendered the way Notion shows it (no markdown markers) */
.prose h2, .prose h3, .prose h4 { color: var(--text); font-weight: 700; margin: 1.6em 0 0.5em; }
.prose h2 { font-size: 20px; line-height: 1.35; }
.prose h3 { font-size: 17px; line-height: 1.4; }
.prose h4 { font-size: 15px; line-height: 1.45; }
.prose p { margin: 0 0 1em; }
.prose a { overflow-wrap: anywhere; }
.prose ul, .prose ol { margin: 0 0 1em; padding-left: 1.6em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin: 0 0 0.4em; padding-left: 0.2em; }
.prose li::marker { color: var(--subtle); }
.prose blockquote { margin: 0 0 1em; padding: 2px 0 2px 14px; border-left: 3px solid var(--text); color: var(--text); }
.prose hr { border: 0; border-top: 1px solid var(--hl-med); margin: 22px 0; }
.prose .gap { height: 0.9em; }
.aside {
  display: flex; gap: 12px; margin: 0 0 1em; padding: 10px 14px;
  background: var(--surface); border-left: 2px solid var(--pine); border-radius: 2px;
}
.aside__icon { flex: none; line-height: 1.6; }
.aside__body { min-width: 0; flex: 1; }
.aside__body > :last-child { margin-bottom: 0; }
code { font-family: var(--mono); color: var(--gold); background: var(--hl-low); padding: 0 4px; border-radius: 2px; }
pre.code {
  background: var(--surface); border: 1px solid var(--hl-low); border-radius: 2px;
  padding: 14px 16px; overflow-x: auto; font-size: 13px; line-height: 1.55; tab-size: 4; margin: 0 0 1.2em;
}
pre.code code { background: none; padding: 0; color: var(--text); }
/* show code exactly as typed: no ligatures turning <- into ← or := into one glyph */
code, pre.code { font-variant-ligatures: none; font-feature-settings: "liga" 0, "calt" 0; }
.k-kw { color: var(--pine); font-weight: 500; }
.k-str { color: var(--gold); }
.k-com { color: var(--muted); font-style: italic; }
.k-pre { color: var(--iris); }
.k-num { color: var(--rose); }
.k-fn { color: var(--rose); }
.k-ty { color: var(--foam); }
/* zoom (tmux prefix-z): reader pane takes the whole screen under the status bar */
.pane__zoom {
  position: absolute; top: -0.8em; right: 12px; z-index: 1;
  padding: 0 6px; background: var(--base);
  font-size: 12px; line-height: 1.6; color: var(--subtle);
}
.pane__zoom:hover { color: var(--rose); }
.pane__zoom[aria-pressed="true"] { color: var(--gold); }
html.zoomed { overflow: hidden; }
.pane.is-zoomed {
  position: fixed; inset: calc(var(--bar) + 14px) 10px 10px; z-index: 5;
  background: var(--base); box-shadow: 0 0 0 14px var(--base);
  animation: zoom-in 0.16s ease both;
}
.pane.is-zoomed .pane__body { overflow: auto; }
.pane.is-zoomed .pane__body > * { max-width: 80ch; margin-left: auto; margin-right: auto; }
.pane.is-zoomed .article .empty { color: var(--subtle); margin-top: 14px; }
.labels-btn[hidden] { display: none; }

.back { display: none; }
@keyframes zoom-in { from { opacity: 0.4; transform: scale(0.985); } }
html.zoomed .tmux__windows a[data-win="blog"]::after { content: "*Z"; }

.back { display: none; color: var(--subtle); font-size: 12.5px; }

/* ── small screens: panes stack, blog becomes list ↔ reader ───── */
@media (max-width: 860px) {
  html { scroll-snap-type: none; }
  .win { flex-direction: column; height: auto; min-height: calc(100dvh - var(--bar)); padding: 14px 8px; gap: 18px; }
  .pane__body { overflow: visible; padding: 16px 14px; }
  .tmux { font-size: 12px; }
  .tmux__windows a { padding: 0 9px; gap: 5px; }
  .fetch { flex-direction: column; gap: 18px; }
  .stat { grid-template-columns: 1.6em 8em 1fr; font-size: 13px; }
  #win-blog .pane--list { flex: none; }
  #win-blog.is-reading .pane--list { display: none; }
  #win-blog:not(.is-reading) .pane--read { display: none; }
  .back { display: inline-block; margin-bottom: 4px; }
  .tl { flex-wrap: wrap; }
  .tl__scroller { order: -1; flex-basis: 100%; }
  .tl__nav { flex: 1; margin-bottom: 10px; }
  .tl__track { height: 320px; }
}

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

/* shared-format extras (backend may emit these; current content doesn't use them) */
.post-img { display: block; max-width: 100%; margin: 1em 0; border: 1px solid var(--hl-med, #403d52); }
details.toggle > summary { cursor: pointer; color: var(--foam, #9ccfd8); }
.c-gray { color: var(--muted, #6e6a86); } .c-brown, .c-orange { color: var(--gold, #f6c177); } .c-yellow { color: var(--gold, #f6c177); }
.c-green { color: var(--foam, #9ccfd8); } .c-blue { color: var(--pine, #31748f); } .c-purple { color: var(--iris, #c4a7e7); }
.c-pink { color: var(--rose, #ebbcba); } .c-red { color: var(--love, #eb6f92); }
