@font-face { font-family: 'Fraunces'; src: url('/site/fraunces.woff2') format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Fraunces'; src: url('/site/fraunces-italic.woff2') format('woff2'); font-weight: 100 900; font-style: italic; font-display: swap; }
@font-face { font-family: 'Plex Mono'; src: url('/site/plex-mono.woff2') format('woff2'); font-weight: 400; font-display: swap; }

:root {
  --paper: #f2ede4;   /* unbleached paper */
  --fibre: #ede6da;   /* living cells: a shade off the paper, kept in sync with FIBRE in life.js */
  --ink: #2a2622;
  --ink-soft: #4a433c;
  --pencil: #6e655b;
  --faint: #8f8475;
  --rule: #d9cfbe;
  --cell: 12px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { background: var(--paper); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh; color: var(--ink);
  font: 300 17px/1.45 'Fraunces', Georgia, serif;
  font-variation-settings: 'SOFT' 100, 'WONK' 1;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}
/* One canvas pixel per cell, scaled up crisp. The 1px paper gutters come from a CSS grid, not the canvas. */
#life {
  position: fixed; inset: 0 auto auto 0; z-index: -2; pointer-events: none;
  image-rendering: pixelated; image-rendering: crisp-edges;
}
body::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(to right, var(--paper) 1px, transparent 1px) 0 0 / var(--cell) var(--cell),
    linear-gradient(to bottom, var(--paper) 1px, transparent 1px) 0 0 / var(--cell) var(--cell);
  background-position: -1px -1px;
}

.page { width: min(640px, 100% - 48px); margin: 0 0 0 clamp(24px, 11vw, 160px); padding: clamp(64px, 16vh, 150px) 0 56px; }
.label { margin: 0; font: 400 11px/14px 'Plex Mono', ui-monospace, monospace; letter-spacing: .14em; text-transform: uppercase; color: #7a7065; }
.quiet { color: var(--faint); letter-spacing: .1em; }

h1 { margin: 22px 0 0; font-weight: 400; font-size: clamp(42px, 9vw, 68px); line-height: 1; letter-spacing: -.025em; }
.bio { margin: 22px 0 0; max-width: 520px; font-style: italic; font-size: clamp(19px, 2.6vw, 23px); line-height: 1.48; color: var(--ink-soft); font-variation-settings: normal; }

section { margin-top: clamp(48px, 9vh, 72px); }
section > .label { padding-bottom: 14px; border-bottom: 1px solid var(--rule); }
.works { list-style: none; margin: 0; padding: 0; counter-reset: work; }
.works li { counter-increment: work; border-bottom: 1px solid var(--rule); }
.works a {
  display: grid; grid-template-columns: 48px 1fr auto; grid-template-areas: 'num title where' 'num what what';
  column-gap: 0; row-gap: 5px; padding: 18px 0 20px; color: inherit; text-decoration: none;
}
.works a::before { content: counter(work, decimal-leading-zero); grid-area: num; font: 400 11px/30px 'Plex Mono', monospace; letter-spacing: .1em; color: var(--faint); }
.title { grid-area: title; font-weight: 450; font-size: 26px; line-height: 30px; letter-spacing: -.01em; }
.arrow { display: inline-block; font-weight: 300; color: var(--faint); transition: transform .25s ease, color .25s; }
.where { grid-area: where; align-self: center; font: 400 11px/14px 'Plex Mono', monospace; letter-spacing: .04em; color: var(--faint); }
.what { grid-area: what; font-size: 17px; line-height: 24px; color: var(--pencil); }
.works a:hover .arrow, .works a:focus-visible .arrow { transform: translate(2px, -2px); color: var(--ink); }
.works a:hover .title { text-decoration: underline; text-decoration-color: var(--rule); text-decoration-thickness: 1px; text-underline-offset: 5px; }
a:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }

footer { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 28px; }
footer a { text-decoration: none; }
footer a:hover { color: var(--ink); }

@media (max-width: 640px) {
  :root { --cell: 10px; }
  .page { margin-inline: 24px; width: auto; }
  .works a { grid-template-columns: 1fr; grid-template-areas: 'title' 'what' 'meta'; padding: 16px 0 18px; row-gap: 4px; }
  /* On phones the number moves down beside the address: "01 · bryanvalencia.dev/music". */
  .works a::before { grid-area: meta; font-size: 10px; line-height: 14px; }
  .where { grid-area: meta; margin-left: 2.8em; font-size: 10px; letter-spacing: .06em; }
  .where::before { content: '· '; }
  .title { font-size: 23px; line-height: 28px; }
  .what { font-size: 16px; line-height: 22px; }
  .quiet { display: none; }
}
@media (prefers-reduced-motion: reduce) { .arrow { transition: none; } }
