/* Hallmark · shape: Session (one terminal session top to bottom: a boot log, one command per section and what it prints, a live prompt at the end) · genre: editorial · theme: custom · job: hire · idea: "Everything about Heorhii is the output of a command he could really run, framed in characters, and the prompt at the end still answers" · vibe: "indigo tty, acid yellow, tables drawn in characters"
 * paper: oklch(21% 0.06 285) · accent: oklch(93% 0.2 112) · display: IBM Plex Mono (found in the project) · body: IBM Plex Mono · hero: whoami prints the name in acid-yellow block letters, then the role, one sentence and two keys · nav: a tmux status line at the bottom, numbered windows, reading progress, the language pair · footer: one comment line, command chips and the live prompt · imagery: the owner's portrait printed as characters · signature: frames and tables ruled in + - | characters, and project figures set in block digits
 * axes: dark/mono/chromatic-yellow · posture: three inks on indigo (yellow for the owner and the actions, aqua for names and links, pink for numbers) · surface: terminal · contrast: pass · fold: pass · v2.0.0 */
/* Hallmark · pre-emit critique: P5 H4 E4 S4 R4 V5 · weakest: S, a terminal portfolio is a known genre; made it his by setting his own figures in block digits and keeping the acid yellow of his first build */
/* Hallmark · waive 64 · body face is IBM Plex Mono, so every label is mono · the owner asked for the site to be a real terminal, mono is its only voice */
/* Hallmark · waive 78 · section heads are prompts at the body size · a terminal prints commands at one size, the owner asked for a real terminal */
/* Hallmark · waive 59 · sections sit three rows apart like commands in a scrollback · a terminal session has no bands, the owner asked for a real terminal */
@import url("./tokens.css");
@import url("./base.css");

html { scroll-behavior: smooth; scroll-padding-top: var(--space-lg); scroll-padding-bottom: calc(var(--bar-height) + var(--space-lg)); }
body { font-weight: 400; line-height: var(--row); }
ul, ol, dl, dd, figure, pre, table, h1, h2, h3 { margin: 0; padding: 0; }
ul, ol { list-style: none; }
h1, h2, h3 { font: inherit; text-wrap: wrap; }
a { color: var(--color-aqua); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { background: var(--color-aqua); color: var(--color-paper); text-decoration: none; }
::selection { background: var(--color-accent); color: var(--color-accent-ink); }

.skip { position: absolute; left: var(--space-md); top: calc(-1 * var(--space-3xl)); z-index: var(--z-toast); padding: var(--space-xs) var(--space-md); background: var(--color-accent); color: var(--color-accent-ink); }
.skip:focus-visible { top: var(--space-md); }

.strong { color: var(--color-ink-2); font-weight: 500; }
.dim { color: var(--color-muted); }
.num { font-variant-numeric: tabular-nums; }
.dir { color: var(--color-aqua); font-weight: 500; }
.lbl { color: var(--color-muted); }
.ok { color: var(--color-success); }

/* ---------- the screen ---------- */

.term { width: 100%; max-width: calc(var(--term-width) + 2 * var(--gutter)); margin-inline: auto; padding: var(--space-lg) var(--gutter) calc(var(--bar-height) + var(--space-3xl)); }
.bootlog { margin-bottom: var(--row); }
.cmd { margin-bottom: calc(var(--row) * 3); }
.prompt { color: var(--color-ink-2); font-weight: 500; overflow-wrap: anywhere; }
.ps1 { color: var(--color-muted); font-weight: 400; }
.ps1__user { color: var(--color-accent); }
.ps1__dir { color: var(--color-aqua); }
.out { margin-top: var(--row); max-width: 100%; }
.out p, .out dd, .out li { max-width: 72ch; overflow-wrap: break-word; }

/* a command waits off screen, types itself, then prints its output line by line */
.js .cmd.is-pending .typed, .js .cmd.is-pending .ln { visibility: hidden; }
.js .cmd.is-live .ln:not(.is-on) { visibility: hidden; }
.js .cmd.is-live .ln.is-on { animation: print var(--dur-short) var(--ease-out) both; }
.js .cmd.is-live .typed::after { content: ""; display: inline-block; width: 1ch; height: 1.25em; margin-left: 1px; vertical-align: -0.25em; background: var(--color-accent); animation: blink 1s steps(1) infinite; }
.js.is-booting .bootlog > :not(.is-on) { visibility: hidden; }
@keyframes print { from { opacity: 0; } }
@keyframes blink { 50% { opacity: 0; } }

/* keys: inverse video, the terminal's only button */
.key { display: inline-flex; align-items: center; min-height: 44px; padding: 0 2ch; border: 1px solid var(--color-accent); border-radius: var(--radius-card); background: var(--color-accent); color: var(--color-accent-ink); font: 500 var(--text-md)/1 var(--font-body); white-space: nowrap; text-decoration: none; cursor: pointer; transition: background-color var(--dur-micro) var(--ease-out), color var(--dur-micro) var(--ease-out); }
.key:hover { background: var(--color-paper); color: var(--color-accent); }
.key:active { transform: translateY(1px); }
.key:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; }
.key:disabled { opacity: 0.55; cursor: not-allowed; }
.key--quiet { background: var(--color-paper); color: var(--color-accent); }
.key--quiet:hover { background: var(--color-accent); color: var(--color-accent-ink); }

/* ---------- whoami ---------- */

.banner { margin-bottom: var(--row); min-width: 0; overflow: hidden; overflow-wrap: break-word; color: var(--color-accent); }
.banner__art { display: block; font: 400 min(1rem, (min(100vw, var(--term-width) + 2 * var(--gutter)) - 2 * var(--gutter)) / (var(--cols, 100) * 0.61))/1 var(--font-block); white-space: pre; user-select: none; }
.banner__art .ln { display: block; }
.lede { margin-top: var(--row); color: var(--color-ink-2); }
.actions { display: flex; flex-wrap: wrap; gap: var(--space-sm) 2ch; margin-top: var(--row); }
.keys { margin-top: var(--row); }

/* ---------- neofetch ---------- */

.fetch { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--row) 6ch; align-items: start; }
.ascii { position: relative; width: min(100%, 18rem); }
.ascii img { width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; }
.ascii pre { color: var(--color-ink); font: 500 var(--ascii-size, 6px)/var(--ascii-lead, 6px) var(--font-block); white-space: pre; overflow: hidden; user-select: none; }
.js .ascii.is-ready img { position: absolute; inset: 0; height: 100%; opacity: 0; transition: opacity var(--dur-short) var(--ease-out); }
.js .ascii.is-ready:hover img { opacity: 1; }
.host { color: var(--color-accent); font-weight: 500; }
.kv > div { display: grid; grid-template-columns: 11ch minmax(0, 1fr); gap: 0 2ch; }
.kv dt { color: var(--color-aqua); font-weight: 500; text-transform: lowercase; overflow-wrap: break-word; }
.swatch { display: flex; margin-top: var(--row); }
.swatch span { width: 3ch; height: var(--row); background: var(--color-paper-3); }
.swatch span:nth-child(2) { background: var(--color-rule); }
.swatch span:nth-child(3) { background: var(--color-pink); }
.swatch span:nth-child(4) { background: var(--color-aqua); }
.swatch span:nth-child(5) { background: var(--color-accent); }
.swatch span:nth-child(6) { background: var(--color-ink-2); }

/* ---------- frames drawn in characters ---------- */

.box { max-width: 80ch; }
.box + .box { margin-top: var(--row); }
.box__edge { display: flex; color: var(--color-rule); white-space: pre; }
.box__edge h3 { flex: none; max-width: calc(100% - 8ch); overflow: hidden; color: var(--color-accent); font-weight: 500; white-space: nowrap; text-overflow: ellipsis; }
.box__fill { flex: 1; min-width: 0; overflow: hidden; }
.box__body { position: relative; padding: 0 3ch 0 2ch; }
.box__body::before, .box__body::after { content: "|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|"; position: absolute; top: 0; bottom: 0; left: 0; overflow: hidden; color: var(--color-rule); white-space: pre; }
.box__body::after { left: auto; right: 0; }
.box__body .gap { margin-top: var(--row); }

/* project figures, set in block digits */
.figs { display: flex; flex-wrap: wrap; gap: var(--row) 5ch; margin-top: var(--row); }
.figs dd { color: var(--color-muted); }
.blk { display: block; margin-bottom: var(--space-xs); color: var(--color-pink); font: 400 0.625rem/1 var(--font-block); white-space: pre; user-select: none; }

/* ---------- tables ruled in characters ---------- */

.tbl { max-width: 100%; border-collapse: collapse; border-spacing: 0; text-align: left; }
.tbl th, .tbl td { position: relative; padding: 0 2ch; font-weight: 400; vertical-align: top; }
.tbl th::before, .tbl td::before { content: "|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A"; position: absolute; top: 0; bottom: 0; left: 0; overflow: hidden; color: var(--color-rule); white-space: pre; }
.tbl thead th { color: var(--color-muted); white-space: nowrap; }
.tbl tbody th { color: var(--color-aqua); font-weight: 500; text-transform: lowercase; white-space: nowrap; }
.tbl .end { width: 1ch; min-width: 1ch; padding: 0; }
.tbl .rule td { height: var(--row); padding: 0; }
.tbl .rule td::before { content: "+------------------------------------------------------------------------------------------------------------------------"; right: 0; white-space: nowrap; }
.tbl .place { color: var(--color-pink); font-weight: 500; white-space: nowrap; }
.tbl .sub { display: none; }
/* links in a table keep one row of height but a full-size tap area */
.tbl--tall a { display: inline-block; margin-block: calc(-1 * var(--space-sm)); padding-block: var(--space-sm); overflow-wrap: anywhere; background-clip: content-box; }
.tbl + p { margin-top: 0; }

/* ---------- skills ---------- */

.tree > li::before { content: "|-- "; color: var(--color-rule); }
.tree > li:last-child::before { content: "`-- "; }
.tree ul li::before { content: "|   |-- "; color: var(--color-rule); white-space: pre; }
.tree ul li:last-child::before { content: "|   `-- "; }
.tree > li:last-child ul li::before { content: "    |-- "; }
.tree > li:last-child ul li:last-child::before { content: "    `-- "; }

/* ---------- photos ---------- */

.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: var(--space-lg); }
.shots figcaption { margin-top: var(--space-xs); }

/* photos attached to a job, a project or an award */
.shot { max-width: 30rem; margin-top: var(--row); }
.shot a { display: block; width: fit-content; max-width: 100%; background: none; }
.shot img { width: auto; max-width: 100%; height: auto; max-height: 22rem; border: 1px solid var(--color-rule); transition: border-color var(--dur-micro) var(--ease-out); }
.shot a:hover img { border-color: var(--color-accent); }
.shot a:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; }
.shot .place { color: var(--color-pink); font-weight: 500; }
.shots--awards { margin-top: var(--row); grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); max-width: 88ch; }
.shots--awards .shot { margin-top: 0; }
.box__body .shot + .gap { margin-top: var(--row); }
.shot a, .ascii a { cursor: zoom-in; }
.ascii a { display: block; background: none; }
.ascii a:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; }

/* the viewer: one photo full size in a frame drawn in characters */
html:has(.viewer[open]) { overflow: hidden; }
.viewer { width: min(100% - 2 * var(--gutter), 120ch); max-width: none; max-height: calc(100dvh - 2 * var(--space-md)); margin: auto; padding: 0 0 var(--space-sm); border: 0; background: var(--color-paper); color: var(--color-ink); font: inherit; line-height: var(--row); overflow: hidden; }
.viewer::backdrop { background: color-mix(in oklch, var(--color-paper) 88%, transparent); }
.viewer[open] { display: flex; flex-direction: column; animation: print var(--dur-short) var(--ease-out); }
.viewer__edge { display: flex; flex: none; color: var(--color-rule); white-space: pre; }
.viewer__title { flex: none; max-width: calc(100% - 16ch); overflow: hidden; color: var(--color-accent); font-weight: 500; text-overflow: ellipsis; }
.viewer__count { flex: none; color: var(--color-pink); }
.viewer__stage { display: flex; flex: 1; min-height: 0; flex-direction: column; align-items: center; gap: var(--space-xs); padding: var(--row) 2ch 0; }
.viewer__stage img { display: block; min-height: 0; max-width: 100%; max-height: calc(100dvh - 2 * var(--space-md) - var(--row) * 6 - 44px); width: auto; height: auto; object-fit: contain; border: 1px solid var(--color-rule); opacity: 0; transition: opacity var(--dur-short) var(--ease-out); }
.viewer__stage img.is-on { opacity: 1; }
.viewer__stage figcaption { max-width: 72ch; text-align: center; }
.viewer__keys { display: flex; flex: none; flex-wrap: wrap; justify-content: center; gap: 0 1ch; margin-top: var(--space-xs); }
.viewer__keys [hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .viewer[open], .viewer__stage img { animation: none; transition: none; } }

/* ---------- the tail: a comment, command chips, the scrollback of typed commands, the live prompt ---------- */

.tail { margin-top: calc(var(--row) * 3); }
.chips { display: flex; flex-wrap: wrap; gap: 0 1ch; }
.chip { min-height: 44px; padding: 0 0.5ch; border: 0; border-radius: var(--radius-card); background: transparent; color: var(--color-aqua); font-weight: 500; cursor: pointer; transition: background-color var(--dur-micro) var(--ease-out), color var(--dur-micro) var(--ease-out); }
.chip::before { content: "[ "; color: var(--color-rule); }
.chip::after { content: " ]"; color: var(--color-rule); }
.chip:hover { background: var(--color-paper-3); color: var(--color-ink-2); }
.chip:active { transform: translateY(1px); }
.chip:focus-visible { outline: 2px solid var(--color-focus); outline-offset: -2px; }
.chip:disabled { opacity: 0.55; cursor: not-allowed; }
.log p { max-width: none; overflow-wrap: anywhere; white-space: pre-wrap; }
.log .said { color: var(--color-ink-2); font-weight: 500; }
.cli { display: flex; align-items: center; gap: 1ch; min-height: 44px; }
.cli .prompt { flex: none; }
.cli input { flex: 1; min-width: 0; min-height: 44px; padding: 0; border: 0; border-bottom: 1px solid transparent; border-radius: 0; background: transparent; color: var(--color-ink-2); font-weight: 500; caret-color: var(--color-accent); caret-shape: block; outline: 0; }
.cli input:focus-visible { border-bottom-color: var(--color-accent); }

/* ---------- the status line ---------- */

.bar { position: fixed; inset: auto 0 0 0; z-index: var(--z-sticky-nav); display: flex; align-items: stretch; gap: 2ch; height: var(--bar-height); padding-inline: var(--gutter); background: var(--color-paper-3); color: var(--color-ink-2); font-weight: 500; }
.bar > * { display: flex; align-items: center; }
.bar__name { color: var(--color-accent); }
.bar__win { flex: 1; min-width: 0; gap: 0; overflow-x: auto; scrollbar-width: none; }
.bar a { display: inline-flex; align-items: center; min-width: 44px; height: 100%; padding-inline: 1ch; justify-content: center; color: inherit; text-decoration: none; white-space: nowrap; transition: background-color var(--dur-micro) var(--ease-out), color var(--dur-micro) var(--ease-out); }
.bar a:hover { background: var(--color-paper); color: var(--color-ink-2); }
.bar a[aria-current] { background: var(--color-accent); color: var(--color-accent-ink); }
.bar a:focus-visible { outline: 2px solid var(--color-ink-2); outline-offset: -4px; }
.bar a[aria-current]:focus-visible { outline-color: var(--color-accent-ink); }
.bar__meter { color: var(--color-ink); white-space: pre; font-variant-numeric: tabular-nums; }
html:not(.js) .bar__meter { display: none; }

@media (max-width: 60rem) {
  .bar__name, .bar__meter { display: none; }
  .bar { gap: 0; padding-inline: 0; }
  .fetch { grid-template-columns: minmax(0, 1fr); }
  .tbl .opt { display: none; }
  .tbl .sub { display: block; }
  .tbl th, .tbl td { padding-right: 1ch; }
  .kv > div { grid-template-columns: 10ch minmax(0, 1fr); }
  .box__body { padding-right: 2ch; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
