/* =========================================================
   quiet.css — the site's look since 2026-11, laid over site.css +
   pencil.css (pages carry class="pencil quiet qu-<page>")

   Concept A (2026-11-16), a ground-up language: one narrow column
   centred on the paper, one size of type, ink for what is named and
   grey for what's said about it, small grey section names, a soft
   wash under the row you point at.

   Bare: no drawing, no colour, no effects (the user, 2026-11-25:
   "just have it be bareeee like extremely minimal"). Its character is
   the type: the whole site is set in Lagunita, and the home page opens
   with the name large (2026-11-26: "extremely minimal barebones but
   have some soul").

   Light only: off-white paper whatever the system is set to (the user,
   2026-11-23: "remove dark and system only light").

   The Lagunita and Design pages keep the wider measure their
   specimens were set for.
   ========================================================= */

:root:root:root.quiet {
  color-scheme: light;
  --qu-ink: #171717;
  --qu-text: #3b3b3b;
  --qu-mid: #6f6f6f;
  --qu-soft: #a3a3a3;
  --qu-bg: #fafaf9;
  --qu-hover: #f0f0ee;
  --qu-line: #cfcfcc;
  --qu-rule: #e6e6e3;
  --qu-rule-hover: #d6d6d2;
  --qu-scrim: rgba(250, 250, 249, 0.94);
  --qu-cardinal: #8c1515;
  --qu-col: 38.5rem;          /* about 75 characters a line */
  --qu-font: "Lagunita", "Iowan Old Style", Georgia, serif;

  --color-bg: var(--qu-bg);
  --color-bg-alt: var(--qu-hover);
  --color-fg: var(--qu-ink);
  --color-muted: var(--qu-text);
  --color-quiet: var(--qu-mid);
  --color-faint: var(--qu-soft);
  --color-border: var(--qu-rule);
  --color-border-hover: var(--qu-rule-hover);
  --color-accent: var(--qu-ink);
  --color-wash: var(--qu-hover);
  --color-underline: var(--qu-line);
  --color-mat: var(--qu-hover);
  --color-scrim: var(--qu-scrim);
  --pencil-shadow: transparent;
  --shadow-lift: 0 1px 2px rgba(0, 0, 0, 0.05), 0 16px 32px -16px rgba(0, 0, 0, 0.18);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.05), 0 16px 32px -16px rgba(0, 0, 0, 0.18);
  --font-display: var(--qu-font);
  --font-sans: var(--qu-font);
  --size: 18.5px;
  --head: 18.5px;
  --sheet: var(--qu-col);
  --small: 15.5px;
  --col: 8.25rem;
  --row-pad: 0.6rem;
  --gap: 3.5rem;
}

/* the type pages, at the size their specimens were set for */
:root:root:root.quiet:is(.qu-lagunita, .qu-design) {
  --size: 1.0625rem;
}

html.quiet,
html.quiet.pencil {
  font-size: 100%;
  background: var(--qu-bg);
}

html.quiet body {
  background: var(--qu-bg);
  color: var(--qu-ink);
  font-family: var(--qu-font);
  font-size: var(--size);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0;
  font-feature-settings: normal;
  font-variant-numeric: oldstyle-nums proportional-nums;
  hanging-punctuation: none;
}

/* no paragraph ends on one word */
html.quiet :is(p, li) {
  text-wrap: pretty;
}

/* the keyboard's place, plainly */
html.quiet :is(a, button, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--qu-ink);
  outline-offset: 3px;
  border-radius: 3px;
}

html.quiet ::selection {
  background: var(--qu-ink);
  color: var(--qu-bg);
}

html.quiet :is(h1, h2, h3, h4, p, li, dt, dd, button, input, kbd, figcaption, blockquote) {
  font-family: var(--qu-font);
  letter-spacing: inherit;
}

html.quiet :is(.pencil-scene, .pencil-cue, .flutter, .koi) {
  display: none !important;
}

/* names a step heavier; everything else regular */
html.quiet.pencil :is(.masthead__name, .masthead__nav-link.active, .index__name, .reach__name,
  .project-item__title, .paper__name, .paper__title, .essay__title, .essay__sub,
  .now__name, .track__name, .stand__name, .comp__name, .stop__name) {
  font-weight: 500;
}

html.quiet.pencil .masthead__role {
  font-weight: 400;
}

/* links in running text: a fine grey line that darkens */
html.quiet .page p a,
html.quiet .about__text a,
html.quiet .contact__text a,
.qu-elsewhere a {
  color: var(--qu-ink);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--qu-line);
  text-underline-offset: 0.22em;
  transition: text-decoration-color 0.15s;
}

html.quiet .page p a:hover,
html.quiet .about__text a:hover,
html.quiet .contact__text a:hover,
.qu-elsewhere a:hover {
  text-decoration-color: var(--qu-ink);
}

/* ---------- The column ---------- */

html.quiet .sheet,
html.quiet .sheet--home {
  display: flex;
  justify-content: center;
  padding: clamp(4.5rem, 14vh, 8.5rem) 1.5rem 3rem;
}

html.quiet .sheet__page,
html.quiet .sheet--home .sheet__page {
  width: 100%;
  max-width: var(--qu-col);
}

/* ---------- Header: the name, then what I do or the pages ---------- */

html.quiet .masthead__name,
html.quiet .masthead--home .masthead__name {
  margin: 0;
  font-family: var(--qu-font);
  font-size: var(--size);
  line-height: 1.5;
  letter-spacing: inherit;
  color: var(--qu-ink);
}

html.quiet .masthead--home {
  min-height: 0;
}

/* the home page opens with the name large, one word to a line */
html.quiet .masthead--home .masthead__name {
  width: min-content;
  margin-left: -0.04em;
  font-size: clamp(2.9rem, 6.4vw, 4.6rem);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.014em;
}

html.quiet.qu-home {
  --gap: 3rem;
}

html.quiet .sheet--home {
  padding-top: clamp(4rem, 12vh, 7.5rem);
}

html.quiet .masthead--home .masthead__role {
  margin: 0.9rem 0 0;
  font-family: var(--qu-font);
  font-size: var(--size);
  line-height: 1.5;
  color: var(--qu-mid);
}

html.quiet .masthead--home .masthead__line,
html.quiet .masthead--home .masthead__line + .masthead__line {
  display: block;
  margin: 0;
  font-size: inherit;
  font-weight: 400;
  color: var(--qu-mid);
  text-wrap: balance;
}

html.quiet .masthead--home .social {
  display: none;
}

/* the pages, in two even lines where they don't fit on one */
html.quiet .masthead__nav {
  margin-top: 0;
  line-height: 1.5;
  text-wrap: balance;
}

html.quiet .masthead__nav-link {
  margin-right: 0.7em;
  transition: color 0.15s;
  color: var(--qu-mid);
}

html.quiet .masthead__nav-link:hover,
html.quiet .masthead__nav-link.active {
  color: var(--qu-ink);
}

html.quiet .kbar-open kbd {
  color: var(--qu-soft);
}

/* ---------- The page ---------- */

html.quiet .page,
html.quiet .page--home {
  padding: var(--gap) 0 0;
  align-self: stretch;
  max-width: none;
}

html.quiet .page-title {
  font-size: var(--size);
}

html.quiet .section-label,
html.quiet .writing__heading,
.qu-h {
  margin: var(--gap) 0 0.9rem;
  font-family: var(--qu-font);
  font-size: var(--size);
  font-style: italic;
  font-weight: 400;
  color: var(--qu-soft);
}

html.quiet .section-label:first-child {
  margin-top: 0;
}

/* rows: the name in ink, what it is in grey, a soft wash when pointed at */
html.quiet .index__row,
html.quiet .project-item,
html.quiet .reach__row {
  border-radius: 6px;
  transition: background-color 0.15s;
}

/* essays: a step up for reading at length */
html.quiet .essay__body {
  font-size: 20px;
  line-height: 1.55;
  color: var(--qu-text);
}

html.quiet .essay__body p + p {
  margin-top: 1.1em;
}

html.quiet .index__note,
html.quiet .project-item__role {
  color: var(--qu-mid);
}

/* ---------- Home: about, what's lately, the pages, elsewhere ---------- */

html.quiet .page--home {
  display: flex;
  flex-direction: column;
}

html.quiet .page--home .about__text {
  order: 1;
  max-width: none;
  font-size: var(--size);
  line-height: 1.5;
  color: var(--qu-text);
}

html.quiet .page--home .about__text p + p {
  margin-top: 1em;
}

html.quiet .page--home .index[aria-label="Lately"] {
  order: 2;
  margin-top: 1.1rem;
}

html.quiet .page--home .index[aria-label="Lately"] .index__row {
  display: block;
  padding-top: 0.15rem;
  padding-bottom: 0.15rem;
}

html.quiet .page--home .index[aria-label="Lately"] .index__name {
  margin-right: 0.5em;
  font-style: italic;
  font-weight: 400;
  color: var(--qu-soft);
}

html.quiet .page--home .index[aria-label="Lately"] .index__note {
  color: var(--qu-text);
}

/* while a song is playing, a small waveform beside it (the home page's
   listening row and the music page's "Playing now"), after the
   now-playing one in the Mac's notch and the iPhone's Dynamic Island:
   five round-ended bars of one width, coloured along a gradient of the
   album's colours. quiet.js draws it, reads the colours off the cover
   and moves the bars. Still bars if motion is turned down. */
@property --qu-c1 { syntax: '<color>'; inherits: true; initial-value: #3aa564; }
@property --qu-c2 { syntax: '<color>'; inherits: true; initial-value: #2f9c8f; }
@property --qu-c3 { syntax: '<color>'; inherits: true; initial-value: #3d86c4; }

html.quiet .page--home [data-listening],
.now[data-now] {
  transition: --qu-c1 0.8s ease, --qu-c2 0.8s ease, --qu-c3 0.8s ease;
}

/* the bar width is a whole number of pixels, and the gaps the same */
.qu-wave {
  --w: 2px;
  --w: max(2px, round(0.12em, 1px));
  display: none;
  flex: none;
  width: calc(var(--w) * 9);
  height: 1.1em;
  margin: 0 0.55em 0 0.05em;
  vertical-align: middle;
}

html.quiet .page--home [data-listening].qu-live .qu-wave,
.now.is-live .qu-wave {
  display: inline-block;
}

/* the music page's sits in a flex row that has its own gap */
.now .qu-wave {
  margin: 0;
}

.qu-wave svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* each bar is one flat colour, its place along c1 -> c2 -> c3 */
.qu-wave line {
  stroke: var(--qu-c2);
  stroke-width: var(--w);
  stroke-linecap: round;
}

.qu-wave line:nth-child(1) { stroke: var(--qu-c1); }
.qu-wave line:nth-child(2) { stroke: color-mix(in oklab, var(--qu-c1), var(--qu-c2)); }
.qu-wave line:nth-child(4) { stroke: color-mix(in oklab, var(--qu-c2), var(--qu-c3)); }
.qu-wave line:nth-child(5) { stroke: var(--qu-c3); }

.qu-h--pages { order: 3; }

html.quiet .page--home .index[aria-label="Pages"] {
  order: 4;
  margin-top: 0;
}

/* the pages as one run of names, as at the top of every other page:
   no notes beside them, in even lines where they don't fit on one */
html.quiet .page--home .index--run {
  display: block;
  margin-left: 0;
  margin-right: 0;
  line-height: 1.7;
  text-wrap: balance;
}

html.quiet .page--home .index--run li {
  display: inline;
}

html.quiet .page--home .index--run .index__row {
  display: inline;
  width: auto;
  margin-right: 1.1rem;
  padding: 0;
  border-radius: 0;
  background: none;
}

/* a page's name is underlined like any other link when pointed at */
html.quiet .page--home .index--run .index__name {
  display: inline;
  font-weight: 400;
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: transparent;
  text-underline-offset: 0.22em;
  transition: text-decoration-color 0.15s;
}

html.quiet .page--home .index--run .index__row:is(:hover, :focus-visible) .index__name {
  text-decoration-color: var(--qu-ink);
}

html.quiet .page--home .index--run .index__note {
  display: none;
}

.qu-h--else { order: 5; }

.qu-elsewhere--home { order: 6; }

html.quiet .page--home .index {
  max-width: none;
}

.qu-elsewhere {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 1.1rem;
  margin: 0;
}

/* ---------- Footer ---------- */

html.quiet .colophon,
html.quiet .sheet--home .colophon {
  align-self: stretch;
  max-width: none;
  margin-top: 6rem;
  padding: 0;
}

html.quiet .colophon__inner,
html.quiet .sheet--home .colophon__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
}

html.quiet .colophon__meta {
  color: var(--qu-soft);
}

/* typing "stanford" in a specimen: the cardinal, lighter on dark */
html.quiet :is(.sp-sample, .dg-sample).is-cardinal {
  color: var(--qu-cardinal);
  caret-color: var(--qu-cardinal);
}

/* the code on /hi stays black on white, so a camera can read it */
html.quiet .hi__code img {
  background: #fff;
}

html.quiet .colophon .social {
  display: none;
}

html.quiet .colophon .qu-elsewhere {
  justify-content: center;
}

html.quiet .colophon .qu-elsewhere a {
  color: var(--qu-mid);
}

/* ---------- Pages that need more room ---------- */

/* the type pages keep the measure their specimens were set for */
:root:root:root.quiet:is(.qu-lagunita, .qu-design) {
  --qu-col: 46rem;
}

@media (min-width: 64em) {
  html.quiet:is(.qu-lagunita, .qu-design) {
    font-size: 106.25%;
  }
}

/* the specimen is set on its own, wider sheet */
html.quiet .sheet--specimen .sheet__page {
  max-width: var(--sp-wrap, 80rem);
}

/* photographs break out of the text column, centred under it, each
   on a light mat like a mounted print */
html.quiet .photos__grid {
  width: min(64rem, 100vw - 3rem);
  margin-left: calc(50% - min(64rem, 100vw - 3rem) / 2);
  column-gap: 0.6rem;
}

html.quiet .photo-item {
  margin-bottom: 0.6rem;
  padding: 0.4rem;
  background: var(--qu-hover);
  border-radius: 2px;
}

/* ---------- Phones ---------- */

@media (max-width: 34rem) {
  html.quiet .sheet,
  html.quiet .sheet--home {
    padding-top: 5rem;
  }
}
