/* brysonvalencia.com: one column, two typefaces, one color (the red of a
   camera's record light). */

:root {
  --paper: #fbfaf7;
  --ink: #171717;
  --muted: #69655e;
  --rule: #e4e1da;
  --wash: #eeebe4;
  --rec: #e0352b;
  --display: 'Oswald', 'Arial Narrow', 'Helvetica Neue', sans-serif;
  --text: 'Source Serif 4', 'Iowan Old Style', Georgia, serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #131312;
    --ink: #ecebe7;
    --muted: #a39f97;
    --rule: #2c2b28;
    --wash: #22211e;
    --rec: #ff4a3d;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 19px/1.65 var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

.wrap { width: 100%; max-width: 728px; margin: 0 auto; padding: 0 24px; }

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  text-decoration-color: var(--rule);
  transition: text-decoration-color 0.15s, color 0.15s, background-color 0.15s;
}
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--rec); outline-offset: 3px; border-radius: 2px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 10; padding: 8px 12px; background: var(--ink); color: var(--paper); }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 30px; padding-bottom: 30px; }
.brand { font: 600 21px/1 var(--display); letter-spacing: 0.005em; text-decoration: none; }
nav { display: flex; gap: 24px; }
nav a { font: 500 14px/1 var(--display); letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none; color: var(--muted); white-space: nowrap; }
nav a:hover, nav a[aria-current] { color: var(--ink); }

main { padding-top: 48px; }

/* Type */
h1, .title { margin: 0 0 18px; font: 600 48px/1.06 var(--display); letter-spacing: -0.005em; text-wrap: balance; }
.lede { margin: 0; font-size: 21px; line-height: 1.55; color: var(--muted); text-wrap: pretty; }
.label { margin: 0 0 18px; font: 500 13px/1 var(--display); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
section { margin-top: 64px; }

/* Home: the top is laid out like an Instagram profile. A round picture,
   three counts, the bio, two buttons. */
.profile {
  display: grid;
  grid-template-columns: 150px 1fr;
  grid-template-rows: auto auto auto 1fr;
  grid-template-areas: "pic name" "pic stats" "pic bio" "pic actions";
  column-gap: 44px;
  margin-top: 0;
}
.avatar { grid-area: pic; align-self: start; display: block; width: 150px; height: 150px; margin-top: 4px; object-fit: cover; border-radius: 50%; background: var(--wash); }
.profile h1 { grid-area: name; margin: 0; font-size: 40px; }
.stats { grid-area: stats; display: flex; flex-wrap: wrap; gap: 6px 28px; margin: 12px 0 0; padding: 0; list-style: none; font-size: 17px; }
.stats a { color: var(--muted); text-decoration: none; }
.stats b { margin-right: 2px; font: 600 19px/1 var(--display); color: var(--ink); }
.stats a:hover { color: var(--ink); }
.bio { grid-area: bio; margin: 14px 0 0; line-height: 1.55; text-wrap: pretty; }
.actions { grid-area: actions; display: flex; gap: 10px; margin: 22px 0 0; }

.ventures { display: grid; gap: 20px; margin: 0; padding: 0; list-style: none; }
.ventures a { font-weight: 600; }
.ventures p { margin: 2px 0 0; font-size: 17px; line-height: 1.5; color: var(--muted); }

.essays { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--rule); }
.essays li { border-bottom: 1px solid var(--rule); }
.essays a { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; padding: 15px 0; text-decoration: none; }
.essays .t { text-wrap: pretty; }
.essays a:hover .t { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
.essays time { flex: none; font-size: 15px; color: var(--muted); font-variant-numeric: tabular-nums; }
.list { margin-top: 40px; }
.more { margin: 18px 0 0; font-size: 17px; }
.empty { color: var(--muted); }

.tally { margin: 0; }
.tally strong { font-weight: 600; }
.bar { height: 5px; margin-top: 14px; overflow: hidden; background: var(--wash); border-radius: 99px; }
.bar span { display: block; height: 100%; background: var(--rec); border-radius: inherit; }

/* Subscribe */
.subscribe { margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--rule); }
.subscribe p { margin: 0 0 16px; }
.btn { display: inline-block; padding: 13px 20px 12px; font: 500 14px/1 var(--display); letter-spacing: 0.12em; text-transform: uppercase; text-decoration: none; color: var(--paper); background: var(--ink); border-radius: 4px; }
.btn:hover { color: #fff; background: var(--rec); }
.btn.soft { color: var(--ink); background: var(--wash); }
.btn.soft:hover { color: var(--ink); background: var(--rule); }
.subscribe .note { margin: 14px 0 0; font-size: 15px; color: var(--muted); }
.list + .subscribe { margin-top: 48px; padding-top: 0; border-top: 0; }

/* One essay */
.back { margin: 0 0 32px; font-size: 16px; }
.back a, .aside a { color: var(--muted); text-decoration: none; }
.back a:hover, .aside a:hover { color: var(--ink); }
.dek { margin: 0; font-size: 22px; line-height: 1.45; font-style: italic; color: var(--muted); text-wrap: pretty; }
.meta { margin: 18px 0 0; font-size: 15px; color: var(--muted); }
.aside { margin: 32px 0 0; font-size: 16px; color: var(--muted); }

.prose { margin-top: 44px; font-size: 20px; line-height: 1.7; }
.prose > :first-child { margin-top: 0; }
.prose p { margin: 0 0 1.2em; }
.prose p:empty { display: none; }
.prose h1, .prose h2, .prose h3, .prose h4 { margin: 1.9em 0 0.55em; font-family: var(--display); font-weight: 600; line-height: 1.15; letter-spacing: 0; text-wrap: balance; }
.prose h1, .prose h2 { font-size: 31px; }
.prose h3 { font-size: 25px; }
.prose h4 { font-size: 21px; }
.prose a { text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); }
.prose a:hover { text-decoration-color: currentColor; }
.prose strong, .prose b { font-weight: 600; }
.prose blockquote { margin: 1.6em 0; padding: 0 0 0 22px; border-left: 3px solid var(--ink); font-style: italic; }
.prose blockquote p:last-child { margin-bottom: 0; }
.prose ul, .prose ol { margin: 0 0 1.2em; padding-left: 1.4em; }
.prose li { margin: 0.4em 0; padding-left: 0.2em; }
.prose li > p { margin: 0; }
.prose hr { width: 64px; margin: 2.6em auto; border: 0; border-top: 1px solid var(--muted); }
.prose figure, .prose .captioned-image-container { margin: 2.2em 0; }
.prose img, .prose video, .prose picture { display: block; max-width: 100%; height: auto; border-radius: 4px; }
.prose figcaption { margin-top: 10px; font-size: 15px; line-height: 1.5; color: var(--muted); text-align: center; }
.prose iframe { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; margin: 2em 0; border: 0; border-radius: 4px; }
.prose pre { overflow-x: auto; padding: 16px 18px; font-size: 15px; line-height: 1.55; background: var(--wash); border-radius: 4px; }
.prose code { padding: 0.12em 0.35em; font: 0.86em/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--wash); border-radius: 3px; }
.prose pre code { padding: 0; background: none; }
.prose .footnote { display: flex; gap: 8px; font-size: 16px; color: var(--muted); }
.prose a.footnote-anchor { font-size: 0.7em; vertical-align: super; text-decoration: none; }
.prose .button-wrapper { margin: 1.8em 0; }
.prose a.button { display: inline-block; padding: 12px 18px 11px; font: 500 14px/1 var(--display); letter-spacing: 0.12em; text-transform: uppercase; text-decoration: none; color: var(--paper); background: var(--ink); border-radius: 4px; }

/* Bucket list */
.photo { margin: 40px 0 0; }
.photo img { display: block; width: 100%; height: auto; border-radius: 6px; background: var(--wash); }
.subhead { margin: 48px 0 12px; font: 600 26px/1.2 var(--display); }
.why { margin: 0; }
.bucket { margin-top: 52px; }
.cat { display: flex; align-items: baseline; justify-content: space-between; margin: 0; padding-bottom: 12px; border-bottom: 1.5px solid var(--ink); font: 600 16px/1 var(--display); letter-spacing: 0.14em; text-transform: uppercase; }
.count { font-weight: 500; letter-spacing: 0.08em; color: var(--muted); font-variant-numeric: tabular-nums; }
.goals { margin: 0; padding: 0; list-style: none; }
.goals li { display: flex; align-items: flex-start; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--rule); }
.mark { flex: none; width: 16px; height: 16px; margin-top: 0.36em; color: var(--ink); }
.mark .tick { stroke: var(--paper); }
.goals .done { color: var(--muted); }
.goals .done .g { text-decoration: line-through; text-decoration-thickness: 1px; text-decoration-color: color-mix(in srgb, var(--muted) 75%, transparent); }

/* Footer */
.foot { margin-top: 96px; padding-bottom: 64px; }
.foot::before { content: ''; display: block; margin-bottom: 32px; border-top: 1px solid var(--rule); }
.hello { margin: 0; font-size: 21px; }
.social { margin: 6px 0 0; color: var(--muted); }
.social a { color: var(--ink); }
.copy { margin: 36px 0 0; font-size: 14px; color: var(--muted); }

@media (max-width: 600px) {
  body { font-size: 18px; }
  .top { padding-top: 22px; padding-bottom: 22px; }
  .brand { font-size: 19px; }
  nav { gap: 16px; }
  nav a { font-size: 13px; letter-spacing: 0.08em; }
  main { padding-top: 28px; }
  h1, .title { font-size: 40px; }
  .lede { font-size: 19px; }
  .profile { grid-template-columns: 88px 1fr; grid-template-rows: auto; grid-template-areas: "pic stats" "name name" "bio bio" "actions actions"; column-gap: 20px; }
  .avatar { align-self: center; width: 88px; height: 88px; margin: 0; }
  .stats { flex-wrap: nowrap; justify-content: space-around; gap: 8px; margin: 0; font-size: 14px; }
  .stats a { display: flex; flex-direction: column; align-items: center; gap: 5px; line-height: 1.2; }
  .stats b { margin: 0; font-size: 21px; }
  .profile h1 { margin-top: 20px; font-size: 30px; }
  .bio { margin-top: 8px; }
  .actions { margin-top: 20px; }
  .actions .btn { flex: 1; text-align: center; }
  section { margin-top: 52px; }
  .essays a { flex-direction: column; align-items: flex-start; gap: 2px; padding: 13px 0; }
  .prose { font-size: 19px; }
  .dek { font-size: 20px; }
  .foot { margin-top: 72px; }
}

@media (prefers-reduced-motion: reduce) {
  a { transition: none; }
}
