/* benjaminvigil.com — direction: The quiet instrument (tasteskill seed 947239701) */

/* Dark only. */
:root {
  color-scheme: dark;
  --bg: #0b0b0b;
  --surface: #161616;
  --ink: #ececec;
  --muted: #9b9b9b;
  --accent: #ff4a3d;
  --accent-ink: #0b0b0b;
  --term: #141414;
  --term-2: #1c1c1c;
  --term-ink: #ececec;
  --term-muted: #8f8f8f;
  --term-ok: #7fd18b;
  --term-hot: #ff6b5e;

  --font: "Albert Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace; /* taste-skill-ignore: terminal fragments only */

  --step-small: clamp(0.875rem, 0.85rem + 0.1vw, 0.9375rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.375rem, 1.15rem + 0.8vw, 1.875rem);
  --step-head: clamp(2.125rem, 1.2rem + 3.4vw, 4.25rem);

  --margin: clamp(1.25rem, 3vw, 2.5rem);
  --col: 640px;
  --frame: 1040px;
  --section: clamp(6rem, 9vw, 8.5rem);
  --radius: 4px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: var(--step-body); line-height: 1.5;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3, p, ul, dl, dd, pre { margin: 0; }
ul { padding: 0; list-style: none; }
button, input { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent); color: var(--accent-ink); }
h1, h2, h3 { font-weight: 600; letter-spacing: -0.035em; line-height: 1.02; text-wrap: balance; }
code { font-family: var(--mono); font-size: 0.9em; } /* taste-skill-ignore */
b { font-weight: 600; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: var(--margin); top: -4rem; background: var(--ink); color: var(--bg); padding: 0.5rem 0.75rem; z-index: 10; }
.skip:focus { top: 0.75rem; }

/* One frame for everything: every block starts on the same left edge; reading text stops at --col. */
.col, .col-wide, .top, .foot { width: min(var(--frame), 100% - 2 * var(--margin)); margin-inline: auto; }
.col > :not(h1) { max-width: var(--col); }

/* ---------- top ---------- */
.top {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  padding-top: 1.75rem; font-size: var(--step-small);
}
.mark { font-weight: 600; text-decoration: none; font-size: var(--step-body); letter-spacing: -0.01em; }
.top nav { display: flex; gap: 1.5rem; }
.top nav a { text-decoration: none; color: var(--ink); }
.top nav a:hover { text-decoration: underline; text-underline-offset: 0.2em; }

/* ---------- hero ---------- */
.hero { padding-top: clamp(5rem, 18vh, 11rem); padding-bottom: clamp(4rem, 10vh, 6rem); }
.hero h1 { font-size: var(--step-head); width: max-content; max-width: calc(100vw - 2 * var(--margin)); }
.lead { margin-top: 2rem; font-size: var(--step-lead); line-height: 1.35; letter-spacing: -0.012em; max-width: 30ch; }
.actions { margin-top: 2rem; }
.textlink { text-decoration: none; font-weight: 500; }
.textlink span { display: inline-block; transition: transform 240ms var(--ease-out); }
.textlink:hover span { transform: translateY(3px); }
.textlink:hover { text-decoration: underline; text-underline-offset: 0.2em; }

/* ---------- shared section heads ---------- */
section h2 { font-size: clamp(1.75rem, 1.3rem + 1.4vw, 2.5rem); }
.col-head { max-width: var(--col); }
.col-head p, .sub { margin-top: 0.75rem; max-width: 46ch; }
.note { margin-top: 1rem; font-size: var(--step-small); color: var(--muted); }
.note code { color: var(--ink); }

/* ---------- record (terminal) ---------- */
.record { padding-bottom: var(--section); }
.term {
  margin-top: 2rem; display: grid; grid-template-columns: 62fr 38fr; min-height: 34rem;
  background: var(--term); color: var(--term-ink); border-radius: var(--radius); overflow: hidden;
  font-family: var(--mono); font-size: 0.875rem; line-height: 1.6; /* taste-skill-ignore */
}
.term-screen { display: flex; flex-direction: column; padding: 1.25rem 1.25rem 1rem; min-width: 0; max-height: 34rem; }
.term-out { flex: 1; overflow-y: auto; white-space: pre-wrap; word-break: break-word; scrollbar-width: thin; }
.term-out pre { font: inherit; white-space: pre-wrap; }
.term-out .c { color: var(--term-ink); }
.term-out .c::before { content: "ben@vigil ~ % "; color: var(--term-muted); }
.term-out .m { color: var(--term-muted); }
.term-out .ok { color: var(--term-ok); }
.term-out .hot { color: var(--term-hot); }
.term-out mark { background: var(--accent); color: var(--accent-ink); }
.term-out a { color: var(--term-ink); }
.term-out .blk { display: block; margin-bottom: 0.9rem; }
.term-line { display: flex; gap: 0.6rem; align-items: baseline; padding-top: 0.6rem; }
.term-line label { flex: none; color: var(--term-muted); }
.term-line input {
  flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--term-ink);
  font-family: var(--mono); font-size: max(16px, 0.875rem); caret-color: var(--term-hot); padding: 0.25rem 0; /* taste-skill-ignore */
}
.term-line input::placeholder { color: #6f6f6f; }
.term-line { border-bottom: 2px solid transparent; transition: border-color 180ms ease; }
.term-line:focus-within { border-bottom-color: var(--accent); } /* taste-skill-ignore: focus state in the terminal fragment */
.term-keys { background: var(--term-2); padding: 0.75rem; display: flex; flex-direction: column; gap: 0.25rem; }
.term-keys button {
  min-height: 2.75rem; padding: 0 0.875rem; border-radius: var(--radius);
  font-family: var(--mono); font-size: 0.875rem; color: var(--term-ink); /* taste-skill-ignore */
  transition: background-color 180ms ease, transform 140ms var(--ease-out);
}
.term-keys button::before { content: "$ "; color: var(--term-muted); }
.term-keys button:hover, .term-keys button:focus-visible { background: #2a2a2a; }
.term-keys button:active { transform: scale(0.98); }
.term-keys button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.term-keys button[aria-pressed="true"]::before { color: var(--accent-ink); }

/* ---------- about ---------- */
.about { padding-bottom: var(--section); }
.about h2 { margin-bottom: 1.75rem; }
.about p + p { margin-top: 1.25rem; }
.about .strong { font-size: var(--step-lead); line-height: 1.35; letter-spacing: -0.012em; }

/* ---------- systems ledger ---------- */
.systems { padding-bottom: var(--section); }
.ledger-wrap { position: relative; }
.ledger { margin-top: 2.5rem; }
.group { font-size: var(--step-body); font-weight: 500; letter-spacing: 0; color: var(--muted); margin: 2.5rem 0 0.5rem; }
.ledger .group:first-child { margin-top: 0; }
.rows li { position: relative; }
.row {
  width: 100%; display: grid; grid-template-columns: 1fr 9.5rem 3rem; gap: 1rem; align-items: baseline;
  padding: 0.7rem 0; color: var(--ink); transition: color 180ms ease;
}
.row .n { font-weight: 500; }
.row .k { font-size: var(--step-small); color: var(--muted); }
.row .y { font-size: var(--step-small); color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.row:hover .n, .row:focus-visible .n, .row[aria-expanded="true"] .n { color: var(--accent); }
.spec { padding: 0.25rem 0 1.25rem; max-width: 56ch; }
.spec p { font-size: var(--step-small); line-height: 1.55; }
.spec p + p { margin-top: 0.5rem; }
.spec b { font-weight: 600; margin-right: 0.35rem; }
.js .spec { display: none; }
.js .row[aria-expanded="true"] + .spec { display: block; animation: drop 320ms var(--ease-out); }
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } }

.preview { display: none; }
@media (min-width: 1240px) {
  .js .preview {
    display: block; position: absolute; top: 0; width: 300px;
    left: calc((100% - var(--frame)) / 2 + var(--col) + 4rem);
    background: var(--surface); border-radius: var(--radius); padding: 1.25rem 1.25rem 1.375rem;
    opacity: 0; transform: translateY(8px);
    transition: opacity 180ms ease, transform 320ms var(--ease-out), top 320ms var(--ease-out);
  }
  .js .preview.on { opacity: 1; transform: none; }
  .preview h4 { margin: 0 0 0.6rem; font-size: var(--step-body); font-weight: 600; letter-spacing: -0.01em; line-height: 1.25; }
  .preview p { font-size: var(--step-small); line-height: 1.55; }
  .preview p + p { margin-top: 0.6rem; }
  .preview b { font-weight: 600; margin-right: 0.35rem; }
  .js .row[aria-expanded="true"] + .spec { display: none; }
}

/* ---------- method (pinned fragment) ---------- */
.method {
  width: min(var(--frame), 100% - 2 * var(--margin)); margin-inline: auto; padding-bottom: var(--section);
  display: grid; grid-template-columns: 5fr 1fr 6fr; align-items: start;
}
.method-text { grid-column: 1; }
.method > h2 { grid-column: 1 / -1; }
.step { cursor: default; }
.step { min-height: 62vh; display: flex; flex-direction: column; justify-content: center; }
.step:first-of-type { min-height: 52vh; }
.step .say { font-size: clamp(1.5rem, 1.1rem + 1.2vw, 2rem); font-weight: 600; letter-spacing: -0.025em; line-height: 1.15; color: var(--muted); transition: color 240ms ease; }
.step p:not(.say) { margin-top: 0.75rem; max-width: 34ch; color: var(--muted); transition: color 240ms ease; }
.step.on .say, .step.on p { color: var(--ink); }
.stage {
  grid-column: 3; position: sticky; top: 18vh; margin-top: 18vh;
  background: var(--term); color: var(--term-ink); border-radius: var(--radius);
  aspect-ratio: 1 / 1; max-height: 64vh; padding: 1.75rem; display: grid;
}
.log {
  grid-area: 1 / 1; font-family: var(--mono); font-size: clamp(0.8125rem, 0.7rem + 0.35vw, 0.9375rem); line-height: 1.75; /* taste-skill-ignore */
  white-space: pre; overflow: hidden; opacity: 0; transform: translateY(10px);
  transition: opacity 360ms ease, transform 520ms var(--ease-out);
}
.log .c { color: var(--term-muted); }
.log .ok { color: var(--term-ok); }
.log .hot { color: var(--term-hot); }
.log.on { opacity: 1; transform: none; }
html:not(.js) .log[data-for="1"] { opacity: 1; transform: none; }

/* ---------- experience ---------- */
.experience { padding-bottom: var(--section); }
.experience h2 { margin-bottom: 0.5rem; }
.list li { display: flex; justify-content: space-between; gap: 1.5rem; padding: 0.55rem 0; }
.list li b { margin-right: 0.4rem; }
.list .v { flex: none; font-size: var(--step-small); color: var(--muted); font-variant-numeric: tabular-nums; padding-top: 0.15em; }
.redact { background: var(--ink); color: var(--bg); padding: 0 0.35em; letter-spacing: 0.02em; }

/* ---------- contact ---------- */
.contact { padding-bottom: clamp(5rem, 14vh, 8rem); }
.contact h2 { margin-bottom: 1.25rem; }
.contact .links-list li { display: grid; grid-template-columns: 7rem 1fr; gap: 1rem; padding: 0.4rem 0; }
.contact .links-list span { color: var(--muted); }
.contact .links-list a { text-decoration: none; transition: color 180ms ease; }
.contact .links-list a:hover, .contact .links-list a:focus-visible { color: var(--accent); }

/* ---------- footer ---------- */
.foot {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: baseline; gap: 1rem;
  padding: 0 0 1.875rem; font-size: var(--step-small); color: var(--muted);
}
.foot .links { display: flex; gap: 1.5rem; }
.foot a { color: var(--ink); text-decoration: none; }
.foot a:hover { text-decoration: underline; text-underline-offset: 0.2em; }
.foot .yr { text-align: right; }

/* ---------- motion ---------- */
.js .rise { opacity: 0; transform: translateY(20px); }
.js .rise.in { opacity: 1; transform: none; transition: opacity 700ms ease, transform 900ms var(--ease-expo); transition-delay: var(--d, 0ms); }

@media (prefers-reduced-motion: reduce) {
  .js .rise, .js .rise.in { opacity: 1; transform: none; transition: none; }
  .log, .log.on { transition: none; transform: none; }
  * { animation: none !important; }
}

/* ---------- tablet and phone ---------- */
@media (max-width: 900px) {
  .term { grid-template-columns: 1fr; min-height: 0; }
  .term-screen { min-height: 22rem; max-height: 26rem; }
  .term-keys { display: grid; grid-template-columns: 1fr 1fr; gap: 0.25rem; }
  .method { grid-template-columns: 1fr; }
  .method > h2 { grid-row: 1; }
  .stage { grid-column: 1; grid-row: 2; position: static; margin-top: 1.75rem; aspect-ratio: auto; height: auto; min-height: 13.5rem; max-height: none; padding: 1.25rem; }
  .method-text { grid-row: 3; margin-top: 1rem; }
  .step, .step:first-of-type { min-height: 0; padding: 1.25rem 0; cursor: pointer; }
  .step p:not(.say) { max-width: none; }
}
@media (max-width: 600px) {
  .top nav { gap: 1rem; }
  .top nav a[href="#systems"] { display: none; }
  .hero { padding-top: 26svh; }
  .hero h1 { width: auto; }
  .hero h1 { font-size: 1.875rem; }
  .hero h1 br { display: none; }
  .row { grid-template-columns: 1fr auto; row-gap: 0.1rem; }
  .row .k { grid-column: 1; grid-row: 2; }
  .row .y { grid-column: 2; grid-row: 1; }
  .term-keys button:nth-child(n+5) { display: none; }
  .list li { flex-direction: column; gap: 0.1rem; }
  .contact .links-list li { grid-template-columns: 5.5rem 1fr; }
  .foot { grid-template-columns: 1fr; gap: 0.5rem; }
  .foot .yr { text-align: left; }
}
