/* Theme: after nousresearch.com — framed paper page, compressed display type, halftone brand panel. */
:root {
  --brand: #00706b; /* theme colour — the one knob. try #008b84 for brighter, #00544f for darker */
  --ink-brand: color-mix(in srgb, var(--brand) 78%, #000);
  --paper: #f3f3f1;
  --card: #fff;
  --ink: #1a1a1a;
  --on-brand: #f5f5f2;
  --rule: color-mix(in srgb, var(--brand) 18%, transparent);
  --display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --sans: system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --frame: 5px;
  --col: 1080px;
  --pad: max(20px, min(5vw, 64px));
}

* { box-sizing: border-box; }
html { background: var(--paper); }
body {
  margin: 0;
  color: var(--ink);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
/* viewport frame */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  border: var(--frame) solid var(--brand);
}
::selection { background: var(--brand); color: var(--on-brand); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
a { color: inherit; }
.wrap { max-width: calc(var(--col) + 2 * var(--pad)); margin: 0 auto; padding: 0 var(--pad); }

.label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.eyebrow {
  margin: 0;
  color: var(--brand);
  font: 700 11px/1 var(--sans);
  letter-spacing: .06em;
  text-transform: uppercase;
}

/* ---- nav ---- */
.nav {
  display: grid;
  grid-template-columns: 1fr 1fr auto 1fr 1fr;
  align-items: center;
  justify-items: center;
  padding-top: 2.25rem;
}
.nav > :first-child { justify-self: start; }
.nav > :last-child { justify-self: end; }
.nav a:not(.wordmark) {
  color: var(--brand);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
}
.nav a:not(.wordmark):hover { text-decoration: underline; text-underline-offset: 4px; }
.wordmark {
  color: var(--brand);
  font: 600 1.6rem/1 var(--display);
  letter-spacing: .02em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}

.crumb {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  max-width: 36rem;
  margin: 1.5rem auto 0;
  padding: .7rem 1rem;
  background: var(--card);
  color: color-mix(in srgb, var(--ink-brand) 65%, transparent);
  font-size: 13px;
}
.crumb b { color: var(--ink-brand); font-weight: 500; }
.crumb .label { font-size: 10px; }

/* ---- home intro ---- */
.intro { padding: 4.5rem 0 1rem; text-align: center; }
.giant {
  max-width: 22ch;
  margin: 1.25rem auto 1.75rem;
  color: var(--brand);
  font-family: var(--display);
  font-size: clamp(3.5rem, 9vw, 8rem);
  font-weight: 300;
  line-height: .88;
  letter-spacing: -.01em;
  text-transform: uppercase;
  text-wrap: balance;
}
.lede { max-width: 34rem; margin: 0 auto; color: var(--ink-brand); }
.actions { display: flex; justify-content: center; gap: .5rem; margin-top: 2rem; }
.btn {
  display: inline-block;
  padding: .75rem .9rem .7rem;
  border-radius: 2px;
  background: color-mix(in srgb, var(--brand) 8%, var(--paper));
  color: var(--ink-brand);
  font: 600 15px/1 var(--display);
  letter-spacing: .04em;
  text-transform: uppercase;
  text-decoration: none;
  transition: box-shadow .15s, transform .15s;
}
.btn:hover { box-shadow: 0 2px 10px rgb(0 0 0 / .12); transform: translateY(-1px); }
.btn--solid { background: var(--brand); color: var(--on-brand); }

/* ---- halftone brand panel ---- */
.panel {
  position: relative;
  isolation: isolate;
  overflow: clip;
  margin-top: 5rem;
  padding: clamp(2.5rem, 7vw, 6rem) clamp(1.25rem, 4vw, 3rem) 3rem;
  border-radius: 6px;
  background: var(--brand);
  color: var(--on-brand);
  container-type: inline-size;
}
.panel::before, .panel::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
/* fine dot field fading out from the top-right = fake dither */
.panel::before {
  background:
    repeating-linear-gradient(transparent 0 2px, rgb(0 0 0 / .1) 2px 3px),
    radial-gradient(circle, rgb(255 255 255 / .55) 1px, transparent 1.6px) 0 0 / 5px 5px;
  -webkit-mask: radial-gradient(ellipse 75% 55% at 78% 0%, #000 10%, transparent 75%);
          mask: radial-gradient(ellipse 75% 55% at 78% 0%, #000 10%, transparent 75%);
}
/* coarser, brighter dots in the hot spot = halftone gradient */
.panel::after {
  background: radial-gradient(circle, rgb(255 255 255 / .8) 1.8px, transparent 2.4px) 0 0 / 9px 9px;
  -webkit-mask: radial-gradient(ellipse 35% 30% at 82% 0%, #000, transparent 80%);
          mask: radial-gradient(ellipse 35% 30% at 82% 0%, #000, transparent 80%);
}
.panel-title {
  margin: 0 0 3rem;
  font-family: var(--display);
  font-size: 33cqi; /* fills the panel for "Field notes" */
  font-weight: 300;
  line-height: .8;
  letter-spacing: -.01em;
  text-transform: uppercase;
  white-space: nowrap;
}

.posts { list-style: none; margin: 0; padding: 0; border-top: 1px solid rgb(255 255 255 / .25); }
.posts li { border-bottom: 1px solid rgb(255 255 255 / .25); }
.posts a {
  display: grid;
  grid-template-columns: 2.5rem 1fr auto;
  align-items: baseline;
  gap: 1rem;
  padding: 1.25rem .75rem;
  text-decoration: none;
  transition: background .15s;
}
.posts a:hover { background: rgb(255 255 255 / .08); }
.posts .idx, .posts time { font-family: var(--mono); font-size: 11px; opacity: .65; font-variant-numeric: tabular-nums; }
.posts .title {
  font-family: var(--display);
  font-size: clamp(1.6rem, 3.5vw, 2.5rem);
  font-weight: 400;
  line-height: 1;
  transition: translate .2s;
}
.posts .title::after { content: " →"; opacity: 0; transition: opacity .2s; }
.posts a:hover .title { translate: .4rem 0; }
.posts a:hover .title::after { opacity: 1; }
.posts .empty { padding: 1.5rem .75rem; font-family: var(--mono); font-size: 12px; opacity: .7; }

/* ---- post hero ---- */
.hero { padding: 4.5rem var(--pad) 0; text-align: center; }
.hero h1 {
  max-width: 16ch;
  margin: 1.25rem auto 0;
  color: var(--brand);
  font-family: var(--display);
  font-size: clamp(3.5rem, 11vw, 9rem);
  font-weight: 300;
  line-height: .88;
  text-transform: uppercase;
}
/* dithered band under the title */
.hero::after {
  content: "";
  display: block;
  max-width: var(--col);
  height: 3rem;
  margin: 3rem auto 0;
  background: radial-gradient(circle, var(--brand) 1.2px, transparent 1.7px) 0 0 / 6px 6px;
  -webkit-mask: linear-gradient(90deg, transparent, #000 30%, #000 70%, transparent);
          mask: linear-gradient(90deg, transparent, #000 30%, #000 70%, transparent);
}

/* ---- article ---- */
.prose { max-width: calc(42rem + 2 * var(--pad)); padding-top: 3rem; padding-bottom: 4rem; }
.prose h2, .prose h3 {
  margin: 2.25em 0 .4em;
  color: var(--brand);
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.05;
}
.prose h2 { font-size: 2.4rem; }
.prose h3 { font-size: 1.6rem; }
.prose a { color: var(--ink-brand); text-underline-offset: 3px; }
.prose a:hover { background: color-mix(in srgb, var(--brand) 12%, transparent); }
.prose code { font-family: var(--mono); font-size: .875em; background: color-mix(in srgb, var(--brand) 9%, transparent); padding: .15em .4em; }
.prose pre {
  overflow-x: auto;
  padding: 1.25rem;
  border-radius: 6px;
  background: var(--brand);
  color: var(--on-brand);
  font-size: .85rem;
}
.prose pre code { background: none; padding: 0; font-size: inherit; }
.prose blockquote {
  margin: 2.5rem 0;
  padding-left: 1.25rem;
  border-left: 3px solid var(--brand);
  color: var(--brand);
  font: 400 1.9rem/1.1 var(--display);
}
.prose blockquote p { margin: 0; }
.prose img { display: block; max-width: 100%; height: auto; border-radius: 6px; }
.prose hr {
  height: 1.5rem;
  margin: 3rem 0;
  border: 0;
  background: radial-gradient(circle, var(--brand) 1px, transparent 1.5px) 0 0 / 6px 6px;
  opacity: .5;
}

/* ---- footer ---- */
.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 4rem;
  padding-top: 1.5rem;
  padding-bottom: 2.5rem;
  border-top: 1px solid var(--rule);
  color: var(--brand);
}
.foot a { text-decoration: none; }
.foot a:hover { text-decoration: underline; text-underline-offset: 4px; }

@media (max-width: 640px) {
  .nav { grid-template-columns: repeat(4, auto); justify-content: space-between; row-gap: 1.25rem; }
  .wordmark { grid-row: 1; grid-column: 1 / -1; justify-self: center; }
  .nav > :first-child { justify-self: auto; }
  .crumb { margin-inline: var(--pad); }
  .posts a { grid-template-columns: 2rem 1fr; }
  .posts time { grid-column: 2; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
